Skip to content

Commit fc52693

Browse files
committed
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
2 parents aababb9 + 64393b3 commit fc52693

19 files changed

+34
-33
lines changed

arch/arm/mach-at91/at91cap9.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,15 @@ static struct clk *periph_clocks[] __initdata = {
223223
};
224224

225225
static struct clk_lookup periph_clocks_lookups[] = {
226-
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
227-
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
226+
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
227+
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
228228
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
229229
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
230230
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
231231
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
232232
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
233-
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk),
234-
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk),
233+
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
234+
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
235235
};
236236

237237
static struct clk_lookup usart_clocks_lookups[] = {

arch/arm/mach-at91/at91cap9_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ void __init at91_set_serial_console(unsigned portnr)
12201220
{
12211221
if (portnr < ATMEL_MAX_UART) {
12221222
atmel_default_console_device = at91_uarts[portnr];
1223-
at91cap9_set_console_clock(portnr);
1223+
at91cap9_set_console_clock(at91_uarts[portnr]->id);
12241224
}
12251225
}
12261226

arch/arm/mach-at91/at91rm9200.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
199199
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
200200
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
201201
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
202-
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk),
203-
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk),
204-
CLKDEV_CON_DEV_ID("ssc", "ssc.2", &ssc2_clk),
202+
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
203+
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
204+
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
205205
};
206206

207207
static struct clk_lookup usart_clocks_lookups[] = {

arch/arm/mach-at91/at91rm9200_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ void __init at91_set_serial_console(unsigned portnr)
11351135
{
11361136
if (portnr < ATMEL_MAX_UART) {
11371137
atmel_default_console_device = at91_uarts[portnr];
1138-
at91rm9200_set_console_clock(portnr);
1138+
at91rm9200_set_console_clock(at91_uarts[portnr]->id);
11391139
}
11401140
}
11411141

arch/arm/mach-at91/at91sam9260_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ void __init at91_set_serial_console(unsigned portnr)
11731173
{
11741174
if (portnr < ATMEL_MAX_UART) {
11751175
atmel_default_console_device = at91_uarts[portnr];
1176-
at91sam9260_set_console_clock(portnr);
1176+
at91sam9260_set_console_clock(at91_uarts[portnr]->id);
11771177
}
11781178
}
11791179

arch/arm/mach-at91/at91sam9261_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ void __init at91_set_serial_console(unsigned portnr)
10131013
{
10141014
if (portnr < ATMEL_MAX_UART) {
10151015
atmel_default_console_device = at91_uarts[portnr];
1016-
at91sam9261_set_console_clock(portnr);
1016+
at91sam9261_set_console_clock(at91_uarts[portnr]->id);
10171017
}
10181018
}
10191019

arch/arm/mach-at91/at91sam9263_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ void __init at91_set_serial_console(unsigned portnr)
13951395
{
13961396
if (portnr < ATMEL_MAX_UART) {
13971397
atmel_default_console_device = at91_uarts[portnr];
1398-
at91sam9263_set_console_clock(portnr);
1398+
at91sam9263_set_console_clock(at91_uarts[portnr]->id);
13991399
}
14001400
}
14011401

arch/arm/mach-at91/at91sam9g45.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ static struct clk *periph_clocks[] __initdata = {
217217
static struct clk_lookup periph_clocks_lookups[] = {
218218
/* One additional fake clock for ohci */
219219
CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
220-
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci.0", &uhphs_clk),
221-
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
222-
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
223-
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
224-
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
220+
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
221+
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
222+
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
223+
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
224+
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
225225
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
226226
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
227227
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk),

arch/arm/mach-at91/at91sam9g45_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ void __init at91_set_serial_console(unsigned portnr)
15501550
{
15511551
if (portnr < ATMEL_MAX_UART) {
15521552
atmel_default_console_device = at91_uarts[portnr];
1553-
at91sam9g45_set_console_clock(portnr);
1553+
at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
15541554
}
15551555
}
15561556

arch/arm/mach-at91/at91sam9rl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ static struct clk *periph_clocks[] __initdata = {
191191
};
192192

193193
static struct clk_lookup periph_clocks_lookups[] = {
194-
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
195-
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
194+
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
195+
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
196196
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
197197
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
198198
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),

arch/arm/mach-at91/at91sam9rl_devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ void __init at91_set_serial_console(unsigned portnr)
11681168
{
11691169
if (portnr < ATMEL_MAX_UART) {
11701170
atmel_default_console_device = at91_uarts[portnr];
1171-
at91sam9rl_set_console_clock(portnr);
1171+
at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
11721172
}
11731173
}
11741174

arch/arm/mach-at91/board-cap9adk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static void __init cap9adk_add_device_nand(void)
215215
csa = at91_sys_read(AT91_MATRIX_EBICSA);
216216
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V);
217217

218-
cap9adk_nand_data.bus_width_16 = !board_have_nand_8bit();
218+
cap9adk_nand_data.bus_width_16 = board_have_nand_16bit();
219219
/* setup bus-width (8 or 16) */
220220
if (cap9adk_nand_data.bus_width_16)
221221
cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/board-sam9260ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
214214

215215
static void __init ek_add_device_nand(void)
216216
{
217-
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
217+
ek_nand_data.bus_width_16 = board_have_nand_16bit();
218218
/* setup bus-width (8 or 16) */
219219
if (ek_nand_data.bus_width_16)
220220
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/board-sam9261ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
220220

221221
static void __init ek_add_device_nand(void)
222222
{
223-
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
223+
ek_nand_data.bus_width_16 = board_have_nand_16bit();
224224
/* setup bus-width (8 or 16) */
225225
if (ek_nand_data.bus_width_16)
226226
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/board-sam9263ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
221221

222222
static void __init ek_add_device_nand(void)
223223
{
224-
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
224+
ek_nand_data.bus_width_16 = board_have_nand_16bit();
225225
/* setup bus-width (8 or 16) */
226226
if (ek_nand_data.bus_width_16)
227227
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/board-sam9g20ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
198198

199199
static void __init ek_add_device_nand(void)
200200
{
201-
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
201+
ek_nand_data.bus_width_16 = board_have_nand_16bit();
202202
/* setup bus-width (8 or 16) */
203203
if (ek_nand_data.bus_width_16)
204204
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/board-sam9m10g45ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
178178

179179
static void __init ek_add_device_nand(void)
180180
{
181-
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
181+
ek_nand_data.bus_width_16 = board_have_nand_16bit();
182182
/* setup bus-width (8 or 16) */
183183
if (ek_nand_data.bus_width_16)
184184
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;

arch/arm/mach-at91/include/mach/system_rev.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
* the 16-31 bit are reserved for at91 generic information
1414
*
1515
* bit 31:
16-
* 0 => nand 16 bit
17-
* 1 => nand 8 bit
16+
* 0 => nand 8 bit
17+
* 1 => nand 16 bit
1818
*/
19-
#define BOARD_HAVE_NAND_8BIT (1 << 31)
20-
static int inline board_have_nand_8bit(void)
19+
#define BOARD_HAVE_NAND_16BIT (1 << 31)
20+
static inline int board_have_nand_16bit(void)
2121
{
22-
return system_rev & BOARD_HAVE_NAND_8BIT;
22+
return system_rev & BOARD_HAVE_NAND_16BIT;
2323
}
2424

2525
#endif /* __ARCH_SYSTEM_REV_H__ */

drivers/tty/serial/atmel_serial.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,12 +1709,13 @@ static int atmel_serial_resume(struct platform_device *pdev)
17091709
static int __devinit atmel_serial_probe(struct platform_device *pdev)
17101710
{
17111711
struct atmel_uart_port *port;
1712+
struct atmel_uart_data *pdata = pdev->dev.platform_data;
17121713
void *data;
17131714
int ret;
17141715

17151716
BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
17161717

1717-
port = &atmel_ports[pdev->id];
1718+
port = &atmel_ports[pdata->num];
17181719
port->backup_imr = 0;
17191720

17201721
atmel_init_port(port, pdev);

0 commit comments

Comments
 (0)