Commit fc52693f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'at91/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc

* 'at91/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc:
  AT91: Change nand buswidth logic to match hardware default configuration
  at91: Use "pclk" as con_id on at91cap9 and at91rm9200
  at91: fix udc, ehci and mmc clock device name for cap9/9g45/9rl
  atmel_serial: fix internal port num
  at91: fix at91_set_serial_console: use platform device id
parents aababb97 64393b3a
...@@ -223,15 +223,15 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -223,15 +223,15 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
}; };
static struct clk_lookup usart_clocks_lookups[] = { static struct clk_lookup usart_clocks_lookups[] = {
......
...@@ -1220,7 +1220,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1220,7 +1220,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91cap9_set_console_clock(portnr); at91cap9_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -199,9 +199,9 @@ static struct clk_lookup periph_clocks_lookups[] = { ...@@ -199,9 +199,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("ssc", "ssc.2", &ssc2_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
}; };
static struct clk_lookup usart_clocks_lookups[] = { static struct clk_lookup usart_clocks_lookups[] = {
......
...@@ -1135,7 +1135,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1135,7 +1135,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91rm9200_set_console_clock(portnr); at91rm9200_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -1173,7 +1173,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1173,7 +1173,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91sam9260_set_console_clock(portnr); at91sam9260_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -1013,7 +1013,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1013,7 +1013,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91sam9261_set_console_clock(portnr); at91sam9261_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -1395,7 +1395,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1395,7 +1395,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91sam9263_set_console_clock(portnr); at91sam9263_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -217,11 +217,11 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -217,11 +217,11 @@ static struct clk *periph_clocks[] __initdata = {
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for ohci */ /* One additional fake clock for ohci */
CLKDEV_CON_ID("ohci_clk", &uhphs_clk), CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci.0", &uhphs_clk), CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk),
......
...@@ -1550,7 +1550,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1550,7 +1550,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91sam9g45_set_console_clock(portnr); at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -191,8 +191,8 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -191,8 +191,8 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
......
...@@ -1168,7 +1168,7 @@ void __init at91_set_serial_console(unsigned portnr) ...@@ -1168,7 +1168,7 @@ void __init at91_set_serial_console(unsigned portnr)
{ {
if (portnr < ATMEL_MAX_UART) { if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr]; atmel_default_console_device = at91_uarts[portnr];
at91sam9rl_set_console_clock(portnr); at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
} }
} }
......
...@@ -215,7 +215,7 @@ static void __init cap9adk_add_device_nand(void) ...@@ -215,7 +215,7 @@ static void __init cap9adk_add_device_nand(void)
csa = at91_sys_read(AT91_MATRIX_EBICSA); csa = at91_sys_read(AT91_MATRIX_EBICSA);
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V);
cap9adk_nand_data.bus_width_16 = !board_have_nand_8bit(); cap9adk_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (cap9adk_nand_data.bus_width_16) if (cap9adk_nand_data.bus_width_16)
cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -214,7 +214,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { ...@@ -214,7 +214,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
static void __init ek_add_device_nand(void) static void __init ek_add_device_nand(void)
{ {
ek_nand_data.bus_width_16 = !board_have_nand_8bit(); ek_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16) if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -220,7 +220,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { ...@@ -220,7 +220,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
static void __init ek_add_device_nand(void) static void __init ek_add_device_nand(void)
{ {
ek_nand_data.bus_width_16 = !board_have_nand_8bit(); ek_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16) if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -221,7 +221,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { ...@@ -221,7 +221,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
static void __init ek_add_device_nand(void) static void __init ek_add_device_nand(void)
{ {
ek_nand_data.bus_width_16 = !board_have_nand_8bit(); ek_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16) if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -198,7 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { ...@@ -198,7 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
static void __init ek_add_device_nand(void) static void __init ek_add_device_nand(void)
{ {
ek_nand_data.bus_width_16 = !board_have_nand_8bit(); ek_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16) if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -178,7 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { ...@@ -178,7 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
static void __init ek_add_device_nand(void) static void __init ek_add_device_nand(void)
{ {
ek_nand_data.bus_width_16 = !board_have_nand_8bit(); ek_nand_data.bus_width_16 = board_have_nand_16bit();
/* setup bus-width (8 or 16) */ /* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16) if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
* the 16-31 bit are reserved for at91 generic information * the 16-31 bit are reserved for at91 generic information
* *
* bit 31: * bit 31:
* 0 => nand 16 bit * 0 => nand 8 bit
* 1 => nand 8 bit * 1 => nand 16 bit
*/ */
#define BOARD_HAVE_NAND_8BIT (1 << 31) #define BOARD_HAVE_NAND_16BIT (1 << 31)
static int inline board_have_nand_8bit(void) static inline int board_have_nand_16bit(void)
{ {
return system_rev & BOARD_HAVE_NAND_8BIT; return system_rev & BOARD_HAVE_NAND_16BIT;
} }
#endif /* __ARCH_SYSTEM_REV_H__ */ #endif /* __ARCH_SYSTEM_REV_H__ */
...@@ -1709,12 +1709,13 @@ static int atmel_serial_resume(struct platform_device *pdev) ...@@ -1709,12 +1709,13 @@ static int atmel_serial_resume(struct platform_device *pdev)
static int __devinit atmel_serial_probe(struct platform_device *pdev) static int __devinit atmel_serial_probe(struct platform_device *pdev)
{ {
struct atmel_uart_port *port; struct atmel_uart_port *port;
struct atmel_uart_data *pdata = pdev->dev.platform_data;
void *data; void *data;
int ret; int ret;
BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1)); BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
port = &atmel_ports[pdev->id]; port = &atmel_ports[pdata->num];
port->backup_imr = 0; port->backup_imr = 0;
atmel_init_port(port, pdev); atmel_init_port(port, pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment