aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/pci_iommu.c1
-rw-r--r--arch/arm/common/dmabounce.c1
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c58
-rw-r--r--arch/avr32/mach-at32ap/at32ap7000.c344
-rw-r--r--arch/avr32/mach-at32ap/extint.c2
-rw-r--r--arch/avr32/mach-at32ap/pm.h4
-rw-r--r--arch/avr32/mach-at32ap/time-tc.c2
-rw-r--r--arch/m68knommu/Kconfig13
-rw-r--r--arch/m68knommu/Makefile3
-rw-r--r--arch/m68knommu/defconfig325
-rw-r--r--arch/m68knommu/kernel/setup.c27
-rw-r--r--arch/m68knommu/kernel/signal.c10
-rw-r--r--arch/m68knommu/kernel/time.c22
-rw-r--r--arch/m68knommu/platform/5206/config.c9
-rw-r--r--arch/m68knommu/platform/5206e/config.c10
-rw-r--r--arch/m68knommu/platform/520x/config.c8
-rw-r--r--arch/m68knommu/platform/523x/config.c8
-rw-r--r--arch/m68knommu/platform/5249/config.c10
-rw-r--r--arch/m68knommu/platform/5272/config.c10
-rw-r--r--arch/m68knommu/platform/527x/config.c8
-rw-r--r--arch/m68knommu/platform/528x/config.c8
-rw-r--r--arch/m68knommu/platform/5307/config.c10
-rw-r--r--arch/m68knommu/platform/5307/entry.S5
-rw-r--r--arch/m68knommu/platform/5307/pit.c15
-rw-r--r--arch/m68knommu/platform/5307/timers.c19
-rw-r--r--arch/m68knommu/platform/532x/config.c10
-rw-r--r--arch/m68knommu/platform/5407/config.c10
-rw-r--r--arch/mips/mm/dma-default.c1
-rw-r--r--arch/parisc/kernel/pci-dma.c1
-rw-r--r--arch/sparc64/kernel/iommu_common.c5
30 files changed, 579 insertions, 380 deletions
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index ee07dceae1d4..2d00a08d3f08 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -7,6 +7,7 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <linux/bootmem.h> 9#include <linux/bootmem.h>
10#include <linux/scatterlist.h>
10#include <linux/log2.h> 11#include <linux/log2.h>
11 12
12#include <asm/io.h> 13#include <asm/io.h>
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 9d371e476552..52fc6a883281 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -29,6 +29,7 @@
29#include <linux/dma-mapping.h> 29#include <linux/dma-mapping.h>
30#include <linux/dmapool.h> 30#include <linux/dmapool.h>
31#include <linux/list.h> 31#include <linux/list.h>
32#include <linux/scatterlist.h>
32 33
33#include <asm/cacheflush.h> 34#include <asm/cacheflush.h>
34 35
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 6b9e466104ad..5be0d13f4b03 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/spi/spi.h> 18#include <linux/spi/spi.h>
19#include <linux/spi/at73c213.h>
19 20
20#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
21 22
@@ -49,7 +50,26 @@ static struct eth_platform_data __initdata eth_data[2] = {
49}; 50};
50 51
51#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM 52#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
53#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
54static struct at73c213_board_info at73c213_data = {
55 .ssc_id = 0,
56 .shortname = "AVR32 STK1000 external DAC",
57};
58#endif
59#endif
60
61#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
52static struct spi_board_info spi0_board_info[] __initdata = { 62static struct spi_board_info spi0_board_info[] __initdata = {
63#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
64 {
65 /* AT73C213 */
66 .modalias = "at73c213",
67 .max_speed_hz = 200000,
68 .chip_select = 0,
69 .mode = SPI_MODE_1,
70 .platform_data = &at73c213_data,
71 },
72#endif
53 { 73 {
54 /* QVGA display */ 74 /* QVGA display */
55 .modalias = "ltv350qv", 75 .modalias = "ltv350qv",
@@ -180,6 +200,38 @@ static void setup_j2_leds(void)
180} 200}
181#endif 201#endif
182 202
203#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
204#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
205static void __init at73c213_set_clk(struct at73c213_board_info *info)
206{
207 struct clk *gclk;
208 struct clk *pll;
209
210 gclk = clk_get(NULL, "gclk0");
211 if (IS_ERR(gclk))
212 goto err_gclk;
213 pll = clk_get(NULL, "pll0");
214 if (IS_ERR(pll))
215 goto err_pll;
216
217 if (clk_set_parent(gclk, pll)) {
218 pr_debug("STK1000: failed to set pll0 as parent for DAC clock\n");
219 goto err_set_clk;
220 }
221
222 at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
223 info->dac_clk = gclk;
224
225err_set_clk:
226 clk_put(pll);
227err_pll:
228 clk_put(gclk);
229err_gclk:
230 return;
231}
232#endif
233#endif
234
183void __init setup_board(void) 235void __init setup_board(void)
184{ 236{
185#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM 237#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
@@ -248,6 +300,12 @@ static int __init atstk1002_init(void)
248 300
249 setup_j2_leds(); 301 setup_j2_leds();
250 302
303#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
304#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
305 at73c213_set_clk(&at73c213_data);
306#endif
307#endif
308
251 return 0; 309 return 0;
252} 310}
253postcore_initcall(atstk1002_init); 311postcore_initcall(atstk1002_init);
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c
index f6d154ca4d24..a9d9ec081e3d 100644
--- a/arch/avr32/mach-at32ap/at32ap7000.c
+++ b/arch/avr32/mach-at32ap/at32ap7000.c
@@ -556,6 +556,17 @@ static struct clk pico_clk = {
556 .users = 1, 556 .users = 1,
557}; 557};
558 558
559static struct resource dmaca0_resource[] = {
560 {
561 .start = 0xff200000,
562 .end = 0xff20ffff,
563 .flags = IORESOURCE_MEM,
564 },
565 IRQ(2),
566};
567DEFINE_DEV(dmaca, 0);
568DEV_CLK(hclk, dmaca0, hsb, 10);
569
559/* -------------------------------------------------------------------- 570/* --------------------------------------------------------------------
560 * HMATRIX 571 * HMATRIX
561 * -------------------------------------------------------------------- */ 572 * -------------------------------------------------------------------- */
@@ -655,6 +666,7 @@ void __init at32_add_system_devices(void)
655 platform_device_register(&at32_eic0_device); 666 platform_device_register(&at32_eic0_device);
656 platform_device_register(&smc0_device); 667 platform_device_register(&smc0_device);
657 platform_device_register(&pdc_device); 668 platform_device_register(&pdc_device);
669 platform_device_register(&dmaca0_device);
658 670
659 platform_device_register(&at32_systc0_device); 671 platform_device_register(&at32_systc0_device);
660 672
@@ -960,6 +972,96 @@ at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n)
960} 972}
961 973
962/* -------------------------------------------------------------------- 974/* --------------------------------------------------------------------
975 * TWI
976 * -------------------------------------------------------------------- */
977static struct resource atmel_twi0_resource[] __initdata = {
978 PBMEM(0xffe00800),
979 IRQ(5),
980};
981static struct clk atmel_twi0_pclk = {
982 .name = "twi_pclk",
983 .parent = &pba_clk,
984 .mode = pba_clk_mode,
985 .get_rate = pba_clk_get_rate,
986 .index = 2,
987};
988
989struct platform_device *__init at32_add_device_twi(unsigned int id)
990{
991 struct platform_device *pdev;
992
993 if (id != 0)
994 return NULL;
995
996 pdev = platform_device_alloc("atmel_twi", id);
997 if (!pdev)
998 return NULL;
999
1000 if (platform_device_add_resources(pdev, atmel_twi0_resource,
1001 ARRAY_SIZE(atmel_twi0_resource)))
1002 goto err_add_resources;
1003
1004 select_peripheral(PA(6), PERIPH_A, 0); /* SDA */
1005 select_peripheral(PA(7), PERIPH_A, 0); /* SDL */
1006
1007 atmel_twi0_pclk.dev = &pdev->dev;
1008
1009 platform_device_add(pdev);
1010 return pdev;
1011
1012err_add_resources:
1013 platform_device_put(pdev);
1014 return NULL;
1015}
1016
1017/* --------------------------------------------------------------------
1018 * MMC
1019 * -------------------------------------------------------------------- */
1020static struct resource atmel_mci0_resource[] __initdata = {
1021 PBMEM(0xfff02400),
1022 IRQ(28),
1023};
1024static struct clk atmel_mci0_pclk = {
1025 .name = "mci_clk",
1026 .parent = &pbb_clk,
1027 .mode = pbb_clk_mode,
1028 .get_rate = pbb_clk_get_rate,
1029 .index = 9,
1030};
1031
1032struct platform_device *__init at32_add_device_mci(unsigned int id)
1033{
1034 struct platform_device *pdev;
1035
1036 if (id != 0)
1037 return NULL;
1038
1039 pdev = platform_device_alloc("atmel_mci", id);
1040 if (!pdev)
1041 return NULL;
1042
1043 if (platform_device_add_resources(pdev, atmel_mci0_resource,
1044 ARRAY_SIZE(atmel_mci0_resource)))
1045 goto err_add_resources;
1046
1047 select_peripheral(PA(10), PERIPH_A, 0); /* CLK */
1048 select_peripheral(PA(11), PERIPH_A, 0); /* CMD */
1049 select_peripheral(PA(12), PERIPH_A, 0); /* DATA0 */
1050 select_peripheral(PA(13), PERIPH_A, 0); /* DATA1 */
1051 select_peripheral(PA(14), PERIPH_A, 0); /* DATA2 */
1052 select_peripheral(PA(15), PERIPH_A, 0); /* DATA3 */
1053
1054 atmel_mci0_pclk.dev = &pdev->dev;
1055
1056 platform_device_add(pdev);
1057 return pdev;
1058
1059err_add_resources:
1060 platform_device_put(pdev);
1061 return NULL;
1062}
1063
1064/* --------------------------------------------------------------------
963 * LCDC 1065 * LCDC
964 * -------------------------------------------------------------------- */ 1066 * -------------------------------------------------------------------- */
965static struct atmel_lcdfb_info atmel_lcdfb0_data; 1067static struct atmel_lcdfb_info atmel_lcdfb0_data;
@@ -1228,6 +1330,241 @@ out_free_pdev:
1228} 1330}
1229 1331
1230/* -------------------------------------------------------------------- 1332/* --------------------------------------------------------------------
1333 * IDE / CompactFlash
1334 * -------------------------------------------------------------------- */
1335static struct resource at32_smc_cs4_resource[] __initdata = {
1336 {
1337 .start = 0x04000000,
1338 .end = 0x07ffffff,
1339 .flags = IORESOURCE_MEM,
1340 },
1341 IRQ(~0UL), /* Magic IRQ will be overridden */
1342};
1343static struct resource at32_smc_cs5_resource[] __initdata = {
1344 {
1345 .start = 0x20000000,
1346 .end = 0x23ffffff,
1347 .flags = IORESOURCE_MEM,
1348 },
1349 IRQ(~0UL), /* Magic IRQ will be overridden */
1350};
1351
1352static int __init at32_init_ide_or_cf(struct platform_device *pdev,
1353 unsigned int cs, unsigned int extint)
1354{
1355 static unsigned int extint_pin_map[4] __initdata = {
1356 GPIO_PIN_PB(25),
1357 GPIO_PIN_PB(26),
1358 GPIO_PIN_PB(27),
1359 GPIO_PIN_PB(28),
1360 };
1361 static bool common_pins_initialized __initdata = false;
1362 unsigned int extint_pin;
1363 int ret;
1364
1365 if (extint >= ARRAY_SIZE(extint_pin_map))
1366 return -EINVAL;
1367 extint_pin = extint_pin_map[extint];
1368
1369 switch (cs) {
1370 case 4:
1371 ret = platform_device_add_resources(pdev,
1372 at32_smc_cs4_resource,
1373 ARRAY_SIZE(at32_smc_cs4_resource));
1374 if (ret)
1375 return ret;
1376
1377 select_peripheral(PE(21), PERIPH_A, 0); /* NCS4 -> OE_N */
1378 set_ebi_sfr_bits(HMATRIX_BIT(CS4A));
1379 break;
1380 case 5:
1381 ret = platform_device_add_resources(pdev,
1382 at32_smc_cs5_resource,
1383 ARRAY_SIZE(at32_smc_cs5_resource));
1384 if (ret)
1385 return ret;
1386
1387 select_peripheral(PE(22), PERIPH_A, 0); /* NCS5 -> OE_N */
1388 set_ebi_sfr_bits(HMATRIX_BIT(CS5A));
1389 break;
1390 default:
1391 return -EINVAL;
1392 }
1393
1394 if (!common_pins_initialized) {
1395 select_peripheral(PE(19), PERIPH_A, 0); /* CFCE1 -> CS0_N */
1396 select_peripheral(PE(20), PERIPH_A, 0); /* CFCE2 -> CS1_N */
1397 select_peripheral(PE(23), PERIPH_A, 0); /* CFRNW -> DIR */
1398 select_peripheral(PE(24), PERIPH_A, 0); /* NWAIT <- IORDY */
1399 common_pins_initialized = true;
1400 }
1401
1402 at32_select_periph(extint_pin, GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH);
1403
1404 pdev->resource[1].start = EIM_IRQ_BASE + extint;
1405 pdev->resource[1].end = pdev->resource[1].start;
1406
1407 return 0;
1408}
1409
1410struct platform_device *__init
1411at32_add_device_ide(unsigned int id, unsigned int extint,
1412 struct ide_platform_data *data)
1413{
1414 struct platform_device *pdev;
1415
1416 pdev = platform_device_alloc("at32_ide", id);
1417 if (!pdev)
1418 goto fail;
1419
1420 if (platform_device_add_data(pdev, data,
1421 sizeof(struct ide_platform_data)))
1422 goto fail;
1423
1424 if (at32_init_ide_or_cf(pdev, data->cs, extint))
1425 goto fail;
1426
1427 platform_device_add(pdev);
1428 return pdev;
1429
1430fail:
1431 platform_device_put(pdev);
1432 return NULL;
1433}
1434
1435struct platform_device *__init
1436at32_add_device_cf(unsigned int id, unsigned int extint,
1437 struct cf_platform_data *data)
1438{
1439 struct platform_device *pdev;
1440
1441 pdev = platform_device_alloc("at32_cf", id);
1442 if (!pdev)
1443 goto fail;
1444
1445 if (platform_device_add_data(pdev, data,
1446 sizeof(struct cf_platform_data)))
1447 goto fail;
1448
1449 if (at32_init_ide_or_cf(pdev, data->cs, extint))
1450 goto fail;
1451
1452 if (data->detect_pin != GPIO_PIN_NONE)
1453 at32_select_gpio(data->detect_pin, AT32_GPIOF_DEGLITCH);
1454 if (data->reset_pin != GPIO_PIN_NONE)
1455 at32_select_gpio(data->reset_pin, 0);
1456 if (data->vcc_pin != GPIO_PIN_NONE)
1457 at32_select_gpio(data->vcc_pin, 0);
1458 /* READY is used as extint, so we can't select it as gpio */
1459
1460 platform_device_add(pdev);
1461 return pdev;
1462
1463fail:
1464 platform_device_put(pdev);
1465 return NULL;
1466}
1467
1468/* --------------------------------------------------------------------
1469 * AC97C
1470 * -------------------------------------------------------------------- */
1471static struct resource atmel_ac97c0_resource[] __initdata = {
1472 PBMEM(0xfff02800),
1473 IRQ(29),
1474};
1475static struct clk atmel_ac97c0_pclk = {
1476 .name = "pclk",
1477 .parent = &pbb_clk,
1478 .mode = pbb_clk_mode,
1479 .get_rate = pbb_clk_get_rate,
1480 .index = 10,
1481};
1482
1483struct platform_device *__init at32_add_device_ac97c(unsigned int id)
1484{
1485 struct platform_device *pdev;
1486
1487 if (id != 0)
1488 return NULL;
1489
1490 pdev = platform_device_alloc("atmel_ac97c", id);
1491 if (!pdev)
1492 return NULL;
1493
1494 if (platform_device_add_resources(pdev, atmel_ac97c0_resource,
1495 ARRAY_SIZE(atmel_ac97c0_resource)))
1496 goto err_add_resources;
1497
1498 select_peripheral(PB(20), PERIPH_B, 0); /* SYNC */
1499 select_peripheral(PB(21), PERIPH_B, 0); /* SDO */
1500 select_peripheral(PB(22), PERIPH_B, 0); /* SDI */
1501 select_peripheral(PB(23), PERIPH_B, 0); /* SCLK */
1502
1503 atmel_ac97c0_pclk.dev = &pdev->dev;
1504
1505 platform_device_add(pdev);
1506 return pdev;
1507
1508err_add_resources:
1509 platform_device_put(pdev);
1510 return NULL;
1511}
1512
1513/* --------------------------------------------------------------------
1514 * ABDAC
1515 * -------------------------------------------------------------------- */
1516static struct resource abdac0_resource[] __initdata = {
1517 PBMEM(0xfff02000),
1518 IRQ(27),
1519};
1520static struct clk abdac0_pclk = {
1521 .name = "pclk",
1522 .parent = &pbb_clk,
1523 .mode = pbb_clk_mode,
1524 .get_rate = pbb_clk_get_rate,
1525 .index = 8,
1526};
1527static struct clk abdac0_sample_clk = {
1528 .name = "sample_clk",
1529 .mode = genclk_mode,
1530 .get_rate = genclk_get_rate,
1531 .set_rate = genclk_set_rate,
1532 .set_parent = genclk_set_parent,
1533 .index = 6,
1534};
1535
1536struct platform_device *__init at32_add_device_abdac(unsigned int id)
1537{
1538 struct platform_device *pdev;
1539
1540 if (id != 0)
1541 return NULL;
1542
1543 pdev = platform_device_alloc("abdac", id);
1544 if (!pdev)
1545 return NULL;
1546
1547 if (platform_device_add_resources(pdev, abdac0_resource,
1548 ARRAY_SIZE(abdac0_resource)))
1549 goto err_add_resources;
1550
1551 select_peripheral(PB(20), PERIPH_A, 0); /* DATA1 */
1552 select_peripheral(PB(21), PERIPH_A, 0); /* DATA0 */
1553 select_peripheral(PB(22), PERIPH_A, 0); /* DATAN1 */
1554 select_peripheral(PB(23), PERIPH_A, 0); /* DATAN0 */
1555
1556 abdac0_pclk.dev = &pdev->dev;
1557 abdac0_sample_clk.dev = &pdev->dev;
1558
1559 platform_device_add(pdev);
1560 return pdev;
1561
1562err_add_resources:
1563 platform_device_put(pdev);
1564 return NULL;
1565}
1566
1567/* --------------------------------------------------------------------
1231 * GCLK 1568 * GCLK
1232 * -------------------------------------------------------------------- */ 1569 * -------------------------------------------------------------------- */
1233static struct clk gclk0 = { 1570static struct clk gclk0 = {
@@ -1290,6 +1627,7 @@ struct clk *at32_clock_list[] = {
1290 &smc0_mck, 1627 &smc0_mck,
1291 &pdc_hclk, 1628 &pdc_hclk,
1292 &pdc_pclk, 1629 &pdc_pclk,
1630 &dmaca0_hclk,
1293 &pico_clk, 1631 &pico_clk,
1294 &pio0_mck, 1632 &pio0_mck,
1295 &pio1_mck, 1633 &pio1_mck,
@@ -1307,6 +1645,8 @@ struct clk *at32_clock_list[] = {
1307 &macb1_pclk, 1645 &macb1_pclk,
1308 &atmel_spi0_spi_clk, 1646 &atmel_spi0_spi_clk,
1309 &atmel_spi1_spi_clk, 1647 &atmel_spi1_spi_clk,
1648 &atmel_twi0_pclk,
1649 &atmel_mci0_pclk,
1310 &atmel_lcdfb0_hck1, 1650 &atmel_lcdfb0_hck1,
1311 &atmel_lcdfb0_pixclk, 1651 &atmel_lcdfb0_pixclk,
1312 &ssc0_pclk, 1652 &ssc0_pclk,
@@ -1314,6 +1654,9 @@ struct clk *at32_clock_list[] = {
1314 &ssc2_pclk, 1654 &ssc2_pclk,
1315 &usba0_hclk, 1655 &usba0_hclk,
1316 &usba0_pclk, 1656 &usba0_pclk,
1657 &atmel_ac97c0_pclk,
1658 &abdac0_pclk,
1659 &abdac0_sample_clk,
1317 &gclk0, 1660 &gclk0,
1318 &gclk1, 1661 &gclk1,
1319 &gclk2, 1662 &gclk2,
@@ -1355,6 +1698,7 @@ void __init at32_clock_init(void)
1355 genclk_init_parent(&gclk3); 1698 genclk_init_parent(&gclk3);
1356 genclk_init_parent(&gclk4); 1699 genclk_init_parent(&gclk4);
1357 genclk_init_parent(&atmel_lcdfb0_pixclk); 1700 genclk_init_parent(&atmel_lcdfb0_pixclk);
1701 genclk_init_parent(&abdac0_sample_clk);
1358 1702
1359 /* 1703 /*
1360 * Turn on all clocks that have at least one user already, and 1704 * Turn on all clocks that have at least one user already, and
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index 8acd01090031..f5bfd4c81fe7 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -142,7 +142,7 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
142 return ret; 142 return ret;
143} 143}
144 144
145struct irq_chip eic_chip = { 145static struct irq_chip eic_chip = {
146 .name = "eic", 146 .name = "eic",
147 .ack = eic_ack_irq, 147 .ack = eic_ack_irq,
148 .mask = eic_mask_irq, 148 .mask = eic_mask_irq,
diff --git a/arch/avr32/mach-at32ap/pm.h b/arch/avr32/mach-at32ap/pm.h
index 47efd0d1951f..694d521edc2f 100644
--- a/arch/avr32/mach-at32ap/pm.h
+++ b/arch/avr32/mach-at32ap/pm.h
@@ -113,8 +113,8 @@
113 113
114/* Register access macros */ 114/* Register access macros */
115#define pm_readl(reg) \ 115#define pm_readl(reg) \
116 __raw_readl((void __iomem *)AT32_PM_BASE + PM_##reg) 116 __raw_readl((void __iomem __force *)AT32_PM_BASE + PM_##reg)
117#define pm_writel(reg,value) \ 117#define pm_writel(reg,value) \
118 __raw_writel((value), (void __iomem *)AT32_PM_BASE + PM_##reg) 118 __raw_writel((value), (void __iomem __force *)AT32_PM_BASE + PM_##reg)
119 119
120#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */ 120#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */
diff --git a/arch/avr32/mach-at32ap/time-tc.c b/arch/avr32/mach-at32ap/time-tc.c
index e3070bdd4bb9..10265863c982 100644
--- a/arch/avr32/mach-at32ap/time-tc.c
+++ b/arch/avr32/mach-at32ap/time-tc.c
@@ -79,7 +79,7 @@ static int avr32_timer_calc_div_and_set_jiffies(struct clk *pclk)
79{ 79{
80 unsigned int cycles_max = (clocksource_avr32.mask + 1) / 2; 80 unsigned int cycles_max = (clocksource_avr32.mask + 1) / 2;
81 unsigned int divs[] = { 4, 8, 16, 32 }; 81 unsigned int divs[] = { 4, 8, 16, 32 };
82 int divs_size = sizeof(divs) / sizeof(*divs); 82 int divs_size = ARRAY_SIZE(divs);
83 int i = 0; 83 int i = 0;
84 unsigned long count_hz; 84 unsigned long count_hz;
85 unsigned long shift; 85 unsigned long shift;
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index f52c627bdadd..f4b582cbb567 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -451,6 +451,12 @@ config MOD5272
451 help 451 help
452 Support for the Netburner MOD-5272 board. 452 Support for the Netburner MOD-5272 board.
453 453
454config SAVANTrosie1
455 bool "Savant Rosie1 board support"
456 depends on M523x
457 help
458 Support for the Savant Rosie1 board.
459
454config ROMFS_FROM_ROM 460config ROMFS_FROM_ROM
455 bool "ROMFS image not RAM resident" 461 bool "ROMFS image not RAM resident"
456 depends on (NETtel || SNAPGEAR) 462 depends on (NETtel || SNAPGEAR)
@@ -492,7 +498,12 @@ config SNEHA
492 bool 498 bool
493 default y 499 default y
494 depends on CPU16B 500 depends on CPU16B
495 501
502config SAVANT
503 bool
504 default y
505 depends on SAVANTrosie1
506
496config AVNET 507config AVNET
497 bool 508 bool
498 default y 509 default y
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 92227aaaa26e..30aa2553693d 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -48,6 +48,7 @@ board-$(CONFIG_SNEHA) := SNEHA
48board-$(CONFIG_M5208EVB) := M5208EVB 48board-$(CONFIG_M5208EVB) := M5208EVB
49board-$(CONFIG_MOD5272) := MOD5272 49board-$(CONFIG_MOD5272) := MOD5272
50board-$(CONFIG_AVNET) := AVNET 50board-$(CONFIG_AVNET) := AVNET
51board-$(CONFIG_SAVANT) := SAVANT
51BOARD := $(board-y) 52BOARD := $(board-y)
52 53
53model-$(CONFIG_RAMKERNEL) := ram 54model-$(CONFIG_RAMKERNEL) := ram
@@ -117,4 +118,4 @@ core-y += arch/m68knommu/kernel/ \
117libs-y += arch/m68knommu/lib/ 118libs-y += arch/m68knommu/lib/
118 119
119archclean: 120archclean:
120 $(Q)$(MAKE) $(clean)=arch/m68knommu/boot 121
diff --git a/arch/m68knommu/defconfig b/arch/m68knommu/defconfig
index 3891de09ac23..5a0ecaaee3b0 100644
--- a/arch/m68knommu/defconfig
+++ b/arch/m68knommu/defconfig
@@ -1,41 +1,48 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.23
4# Tue Jun 27 12:57:06 2006 4# Thu Oct 18 13:17:38 2007
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7# CONFIG_MMU is not set 7# CONFIG_MMU is not set
8# CONFIG_FPU is not set 8# CONFIG_FPU is not set
9CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 10CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 11# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
12# CONFIG_ARCH_HAS_ILOG2_U32 is not set
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set
11CONFIG_GENERIC_FIND_NEXT_BIT=y 14CONFIG_GENERIC_FIND_NEXT_BIT=y
12CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 17CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_TIME_LOW_RES=y 18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 21
16# 22#
17# Code maturity level options 23# General setup
18# 24#
19CONFIG_EXPERIMENTAL=y 25CONFIG_EXPERIMENTAL=y
20CONFIG_BROKEN_ON_SMP=y 26CONFIG_BROKEN_ON_SMP=y
21CONFIG_INIT_ENV_ARG_LIMIT=32 27CONFIG_INIT_ENV_ARG_LIMIT=32
22
23#
24# General setup
25#
26CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
27CONFIG_LOCALVERSION_AUTO=y 29CONFIG_LOCALVERSION_AUTO=y
28# CONFIG_SYSVIPC is not set 30# CONFIG_SYSVIPC is not set
29# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
30# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
31# CONFIG_SYSCTL is not set 33# CONFIG_TASKSTATS is not set
34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33# CONFIG_IKCONFIG is not set 36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_SYSFS_DEPRECATED is not set
34# CONFIG_RELAY is not set 39# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 40# CONFIG_BLK_DEV_INITRD is not set
36CONFIG_UID16=y
37# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SYSCTL=y
38CONFIG_EMBEDDED=y 43CONFIG_EMBEDDED=y
44CONFIG_UID16=y
45CONFIG_SYSCTL_SYSCALL=y
39# CONFIG_KALLSYMS is not set 46# CONFIG_KALLSYMS is not set
40# CONFIG_HOTPLUG is not set 47# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 48CONFIG_PRINTK=y
@@ -44,20 +51,25 @@ CONFIG_ELF_CORE=y
44CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
45# CONFIG_FUTEX is not set 52# CONFIG_FUTEX is not set
46# CONFIG_EPOLL is not set 53# CONFIG_EPOLL is not set
54# CONFIG_SIGNALFD is not set
55# CONFIG_EVENTFD is not set
56# CONFIG_VM_EVENT_COUNTERS is not set
47CONFIG_SLAB=y 57CONFIG_SLAB=y
58# CONFIG_SLUB is not set
59# CONFIG_SLOB is not set
48CONFIG_TINY_SHMEM=y 60CONFIG_TINY_SHMEM=y
49CONFIG_BASE_SMALL=0 61CONFIG_BASE_SMALL=0
50# CONFIG_SLOB is not set 62CONFIG_MODULES=y
51 63CONFIG_MODULE_UNLOAD=y
52# 64# CONFIG_MODULE_FORCE_UNLOAD is not set
53# Loadable module support 65# CONFIG_MODVERSIONS is not set
54# 66# CONFIG_MODULE_SRCVERSION_ALL is not set
55# CONFIG_MODULES is not set 67# CONFIG_KMOD is not set
56 68CONFIG_BLOCK=y
57# 69# CONFIG_LBD is not set
58# Block layer
59#
60# CONFIG_BLK_DEV_IO_TRACE is not set 70# CONFIG_BLK_DEV_IO_TRACE is not set
71# CONFIG_LSF is not set
72# CONFIG_BLK_DEV_BSG is not set
61 73
62# 74#
63# IO Schedulers 75# IO Schedulers
@@ -99,6 +111,7 @@ CONFIG_CLOCK_DIV=1
99# 111#
100# Platform 112# Platform
101# 113#
114# CONFIG_UC5272 is not set
102CONFIG_M5272C3=y 115CONFIG_M5272C3=y
103# CONFIG_COBRA5272 is not set 116# CONFIG_COBRA5272 is not set
104# CONFIG_CANCam is not set 117# CONFIG_CANCam is not set
@@ -107,7 +120,6 @@ CONFIG_M5272C3=y
107# CONFIG_CPU16B is not set 120# CONFIG_CPU16B is not set
108# CONFIG_MOD5272 is not set 121# CONFIG_MOD5272 is not set
109CONFIG_FREESCALE=y 122CONFIG_FREESCALE=y
110# CONFIG_LARGE_ALLOCS is not set
111CONFIG_4KSTACKS=y 123CONFIG_4KSTACKS=y
112 124
113# 125#
@@ -121,6 +133,11 @@ CONFIG_RAMAUTOBIT=y
121# CONFIG_RAM8BIT is not set 133# CONFIG_RAM8BIT is not set
122# CONFIG_RAM16BIT is not set 134# CONFIG_RAM16BIT is not set
123# CONFIG_RAM32BIT is not set 135# CONFIG_RAM32BIT is not set
136
137#
138# ROM configuration
139#
140# CONFIG_ROM is not set
124CONFIG_RAMKERNEL=y 141CONFIG_RAMKERNEL=y
125# CONFIG_ROMKERNEL is not set 142# CONFIG_ROMKERNEL is not set
126CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
@@ -131,20 +148,19 @@ CONFIG_FLATMEM=y
131CONFIG_FLAT_NODE_MEM_MAP=y 148CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_SPARSEMEM_STATIC is not set 149# CONFIG_SPARSEMEM_STATIC is not set
133CONFIG_SPLIT_PTLOCK_CPUS=4 150CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set
152CONFIG_ZONE_DMA_FLAG=1
153CONFIG_VIRT_TO_BUS=y
134 154
135# 155#
136# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 156# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
137# 157#
138# CONFIG_PCI is not set 158# CONFIG_PCI is not set
159# CONFIG_ARCH_SUPPORTS_MSI is not set
139 160
140# 161#
141# PCCARD (PCMCIA/CardBus) support 162# PCCARD (PCMCIA/CardBus) support
142# 163#
143# CONFIG_PCCARD is not set
144
145#
146# PCI Hotplug Support
147#
148 164
149# 165#
150# Executable file formats 166# Executable file formats
@@ -168,7 +184,6 @@ CONFIG_NET=y
168# 184#
169# Networking options 185# Networking options
170# 186#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y 187CONFIG_PACKET=y
173# CONFIG_PACKET_MMAP is not set 188# CONFIG_PACKET_MMAP is not set
174CONFIG_UNIX=y 189CONFIG_UNIX=y
@@ -187,27 +202,21 @@ CONFIG_IP_FIB_HASH=y
187# CONFIG_INET_IPCOMP is not set 202# CONFIG_INET_IPCOMP is not set
188# CONFIG_INET_XFRM_TUNNEL is not set 203# CONFIG_INET_XFRM_TUNNEL is not set
189# CONFIG_INET_TUNNEL is not set 204# CONFIG_INET_TUNNEL is not set
205# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
206# CONFIG_INET_XFRM_MODE_TUNNEL is not set
207# CONFIG_INET_XFRM_MODE_BEET is not set
190# CONFIG_INET_DIAG is not set 208# CONFIG_INET_DIAG is not set
191# CONFIG_TCP_CONG_ADVANCED is not set 209# CONFIG_TCP_CONG_ADVANCED is not set
192CONFIG_TCP_CONG_BIC=y 210CONFIG_TCP_CONG_CUBIC=y
211CONFIG_DEFAULT_TCP_CONG="cubic"
212# CONFIG_TCP_MD5SIG is not set
193# CONFIG_IPV6 is not set 213# CONFIG_IPV6 is not set
194# CONFIG_INET6_XFRM_TUNNEL is not set 214# CONFIG_INET6_XFRM_TUNNEL is not set
195# CONFIG_INET6_TUNNEL is not set 215# CONFIG_INET6_TUNNEL is not set
216# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set 217# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set 218# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set 219# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set 220# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 221# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 222# CONFIG_BRIDGE is not set
@@ -218,7 +227,6 @@ CONFIG_TCP_CONG_BIC=y
218# CONFIG_ATALK is not set 227# CONFIG_ATALK is not set
219# CONFIG_X25 is not set 228# CONFIG_X25 is not set
220# CONFIG_LAPB is not set 229# CONFIG_LAPB is not set
221# CONFIG_NET_DIVERT is not set
222# CONFIG_ECONET is not set 230# CONFIG_ECONET is not set
223# CONFIG_WAN_ROUTER is not set 231# CONFIG_WAN_ROUTER is not set
224 232
@@ -234,7 +242,17 @@ CONFIG_TCP_CONG_BIC=y
234# CONFIG_HAMRADIO is not set 242# CONFIG_HAMRADIO is not set
235# CONFIG_IRDA is not set 243# CONFIG_IRDA is not set
236# CONFIG_BT is not set 244# CONFIG_BT is not set
245# CONFIG_AF_RXRPC is not set
246
247#
248# Wireless
249#
250# CONFIG_CFG80211 is not set
251# CONFIG_WIRELESS_EXT is not set
252# CONFIG_MAC80211 is not set
237# CONFIG_IEEE80211 is not set 253# CONFIG_IEEE80211 is not set
254# CONFIG_RFKILL is not set
255# CONFIG_NET_9P is not set
238 256
239# 257#
240# Device Drivers 258# Device Drivers
@@ -245,16 +263,8 @@ CONFIG_TCP_CONG_BIC=y
245# 263#
246CONFIG_STANDALONE=y 264CONFIG_STANDALONE=y
247CONFIG_PREVENT_FIRMWARE_BUILD=y 265CONFIG_PREVENT_FIRMWARE_BUILD=y
248# CONFIG_FW_LOADER is not set 266# CONFIG_SYS_HYPERVISOR is not set
249
250#
251# Connector - unified userspace <-> kernelspace linker
252#
253# CONFIG_CONNECTOR is not set 267# CONFIG_CONNECTOR is not set
254
255#
256# Memory Technology Devices (MTD)
257#
258CONFIG_MTD=y 268CONFIG_MTD=y
259# CONFIG_MTD_DEBUG is not set 269# CONFIG_MTD_DEBUG is not set
260# CONFIG_MTD_CONCAT is not set 270# CONFIG_MTD_CONCAT is not set
@@ -266,11 +276,13 @@ CONFIG_MTD_PARTITIONS=y
266# User Modules And Translation Layers 276# User Modules And Translation Layers
267# 277#
268CONFIG_MTD_CHAR=y 278CONFIG_MTD_CHAR=y
279CONFIG_MTD_BLKDEVS=y
269CONFIG_MTD_BLOCK=y 280CONFIG_MTD_BLOCK=y
270# CONFIG_FTL is not set 281# CONFIG_FTL is not set
271# CONFIG_NFTL is not set 282# CONFIG_NFTL is not set
272# CONFIG_INFTL is not set 283# CONFIG_INFTL is not set
273# CONFIG_RFD_FTL is not set 284# CONFIG_RFD_FTL is not set
285# CONFIG_SSFDC is not set
274 286
275# 287#
276# RAM/ROM/Flash chip drivers 288# RAM/ROM/Flash chip drivers
@@ -290,7 +302,6 @@ CONFIG_MTD_CFI_I2=y
290CONFIG_MTD_RAM=y 302CONFIG_MTD_RAM=y
291# CONFIG_MTD_ROM is not set 303# CONFIG_MTD_ROM is not set
292# CONFIG_MTD_ABSENT is not set 304# CONFIG_MTD_ABSENT is not set
293# CONFIG_MTD_OBSOLETE_CHIPS is not set
294 305
295# 306#
296# Mapping drivers for chip access 307# Mapping drivers for chip access
@@ -313,42 +324,25 @@ CONFIG_MTD_UCLINUX=y
313# CONFIG_MTD_DOC2000 is not set 324# CONFIG_MTD_DOC2000 is not set
314# CONFIG_MTD_DOC2001 is not set 325# CONFIG_MTD_DOC2001 is not set
315# CONFIG_MTD_DOC2001PLUS is not set 326# CONFIG_MTD_DOC2001PLUS is not set
316
317#
318# NAND Flash Device Drivers
319#
320# CONFIG_MTD_NAND is not set 327# CONFIG_MTD_NAND is not set
321
322#
323# OneNAND Flash Device Drivers
324#
325# CONFIG_MTD_ONENAND is not set 328# CONFIG_MTD_ONENAND is not set
326 329
327# 330#
328# Parallel port support 331# UBI - Unsorted block images
329# 332#
333# CONFIG_MTD_UBI is not set
330# CONFIG_PARPORT is not set 334# CONFIG_PARPORT is not set
331 335CONFIG_BLK_DEV=y
332#
333# Plug and Play support
334#
335
336#
337# Block devices
338#
339# CONFIG_BLK_DEV_COW_COMMON is not set 336# CONFIG_BLK_DEV_COW_COMMON is not set
340# CONFIG_BLK_DEV_LOOP is not set 337# CONFIG_BLK_DEV_LOOP is not set
341# CONFIG_BLK_DEV_NBD is not set 338# CONFIG_BLK_DEV_NBD is not set
342CONFIG_BLK_DEV_RAM=y 339CONFIG_BLK_DEV_RAM=y
343CONFIG_BLK_DEV_RAM_COUNT=16 340CONFIG_BLK_DEV_RAM_COUNT=16
344CONFIG_BLK_DEV_RAM_SIZE=4096 341CONFIG_BLK_DEV_RAM_SIZE=4096
345# CONFIG_BLK_DEV_INITRD is not set 342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
346# CONFIG_CDROM_PKTCDVD is not set 343# CONFIG_CDROM_PKTCDVD is not set
347# CONFIG_ATA_OVER_ETH is not set 344# CONFIG_ATA_OVER_ETH is not set
348 345# CONFIG_MISC_DEVICES is not set
349#
350# ATA/ATAPI/MFM/RLL support
351#
352# CONFIG_IDE is not set 346# CONFIG_IDE is not set
353 347
354# 348#
@@ -356,67 +350,29 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
356# 350#
357# CONFIG_RAID_ATTRS is not set 351# CONFIG_RAID_ATTRS is not set
358# CONFIG_SCSI is not set 352# CONFIG_SCSI is not set
359 353# CONFIG_SCSI_DMA is not set
360# 354# CONFIG_SCSI_NETLINK is not set
361# Multi-device support (RAID and LVM)
362#
363# CONFIG_MD is not set 355# CONFIG_MD is not set
364
365#
366# Fusion MPT device support
367#
368# CONFIG_FUSION is not set
369
370#
371# IEEE 1394 (FireWire) support
372#
373
374#
375# I2O device support
376#
377
378#
379# Network device support
380#
381CONFIG_NETDEVICES=y 356CONFIG_NETDEVICES=y
357# CONFIG_NETDEVICES_MULTIQUEUE is not set
382# CONFIG_DUMMY is not set 358# CONFIG_DUMMY is not set
383# CONFIG_BONDING is not set 359# CONFIG_BONDING is not set
360# CONFIG_MACVLAN is not set
384# CONFIG_EQUALIZER is not set 361# CONFIG_EQUALIZER is not set
385# CONFIG_TUN is not set 362# CONFIG_TUN is not set
386
387#
388# PHY device support
389#
390# CONFIG_PHYLIB is not set 363# CONFIG_PHYLIB is not set
391
392#
393# Ethernet (10 or 100Mbit)
394#
395CONFIG_NET_ETHERNET=y 364CONFIG_NET_ETHERNET=y
396# CONFIG_MII is not set 365# CONFIG_MII is not set
397CONFIG_FEC=y 366CONFIG_FEC=y
398# CONFIG_FEC2 is not set 367# CONFIG_FEC2 is not set
368# CONFIG_NETDEV_1000 is not set
369# CONFIG_NETDEV_10000 is not set
399 370
400# 371#
401# Ethernet (1000 Mbit) 372# Wireless LAN
402#
403
404#
405# Ethernet (10000 Mbit)
406#
407
408#
409# Token Ring devices
410#
411
412#
413# Wireless LAN (non-hamradio)
414#
415# CONFIG_NET_RADIO is not set
416
417#
418# Wan interfaces
419# 373#
374# CONFIG_WLAN_PRE80211 is not set
375# CONFIG_WLAN_80211 is not set
420# CONFIG_WAN is not set 376# CONFIG_WAN is not set
421CONFIG_PPP=y 377CONFIG_PPP=y
422# CONFIG_PPP_MULTILINK is not set 378# CONFIG_PPP_MULTILINK is not set
@@ -427,20 +383,14 @@ CONFIG_PPP=y
427# CONFIG_PPP_BSDCOMP is not set 383# CONFIG_PPP_BSDCOMP is not set
428# CONFIG_PPP_MPPE is not set 384# CONFIG_PPP_MPPE is not set
429# CONFIG_PPPOE is not set 385# CONFIG_PPPOE is not set
386# CONFIG_PPPOL2TP is not set
430# CONFIG_SLIP is not set 387# CONFIG_SLIP is not set
388CONFIG_SLHC=y
431# CONFIG_SHAPER is not set 389# CONFIG_SHAPER is not set
432# CONFIG_NETCONSOLE is not set 390# CONFIG_NETCONSOLE is not set
433# CONFIG_NETPOLL is not set 391# CONFIG_NETPOLL is not set
434# CONFIG_NET_POLL_CONTROLLER is not set 392# CONFIG_NET_POLL_CONTROLLER is not set
435
436#
437# ISDN subsystem
438#
439# CONFIG_ISDN is not set 393# CONFIG_ISDN is not set
440
441#
442# Telephony Support
443#
444# CONFIG_PHONE is not set 394# CONFIG_PHONE is not set
445 395
446# 396#
@@ -472,34 +422,13 @@ CONFIG_SERIAL_COLDFIRE=y
472# CONFIG_UNIX98_PTYS is not set 422# CONFIG_UNIX98_PTYS is not set
473CONFIG_LEGACY_PTYS=y 423CONFIG_LEGACY_PTYS=y
474CONFIG_LEGACY_PTY_COUNT=256 424CONFIG_LEGACY_PTY_COUNT=256
475
476#
477# IPMI
478#
479# CONFIG_IPMI_HANDLER is not set 425# CONFIG_IPMI_HANDLER is not set
480
481#
482# Watchdog Cards
483#
484# CONFIG_WATCHDOG is not set 426# CONFIG_WATCHDOG is not set
427# CONFIG_HW_RANDOM is not set
485# CONFIG_GEN_RTC is not set 428# CONFIG_GEN_RTC is not set
486# CONFIG_DTLK is not set
487# CONFIG_R3964 is not set 429# CONFIG_R3964 is not set
488
489#
490# Ftape, the floppy tape device driver
491#
492# CONFIG_RAW_DRIVER is not set 430# CONFIG_RAW_DRIVER is not set
493
494#
495# TPM devices
496#
497# CONFIG_TCG_TPM is not set 431# CONFIG_TCG_TPM is not set
498# CONFIG_TELCLOCK is not set
499
500#
501# I2C support
502#
503# CONFIG_I2C is not set 432# CONFIG_I2C is not set
504 433
505# 434#
@@ -507,101 +436,74 @@ CONFIG_LEGACY_PTY_COUNT=256
507# 436#
508# CONFIG_SPI is not set 437# CONFIG_SPI is not set
509# CONFIG_SPI_MASTER is not set 438# CONFIG_SPI_MASTER is not set
510
511#
512# Dallas's 1-wire bus
513#
514# CONFIG_W1 is not set 439# CONFIG_W1 is not set
515 440# CONFIG_POWER_SUPPLY is not set
516#
517# Hardware Monitoring support
518#
519# CONFIG_HWMON is not set 441# CONFIG_HWMON is not set
520# CONFIG_HWMON_VID is not set
521 442
522# 443#
523# Misc devices 444# Multifunction device drivers
524# 445#
446# CONFIG_MFD_SM501 is not set
525 447
526# 448#
527# Multimedia devices 449# Multimedia devices
528# 450#
529# CONFIG_VIDEO_DEV is not set 451# CONFIG_VIDEO_DEV is not set
530CONFIG_VIDEO_V4L2=y 452# CONFIG_DVB_CORE is not set
453CONFIG_DAB=y
531 454
532# 455#
533# Digital Video Broadcasting Devices 456# Graphics support
534# 457#
535# CONFIG_DVB is not set 458# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
536 459
537# 460#
538# Graphics support 461# Display device support
539# 462#
463# CONFIG_DISPLAY_SUPPORT is not set
464# CONFIG_VGASTATE is not set
465CONFIG_VIDEO_OUTPUT_CONTROL=y
540# CONFIG_FB is not set 466# CONFIG_FB is not set
541 467
542# 468#
543# Sound 469# Sound
544# 470#
545# CONFIG_SOUND is not set 471# CONFIG_SOUND is not set
546 472# CONFIG_USB_SUPPORT is not set
547#
548# USB support
549#
550# CONFIG_USB_ARCH_HAS_HCD is not set
551# CONFIG_USB_ARCH_HAS_OHCI is not set
552# CONFIG_USB_ARCH_HAS_EHCI is not set
553
554#
555# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
556#
557
558#
559# USB Gadget Support
560#
561# CONFIG_USB_GADGET is not set
562
563#
564# MMC/SD Card support
565#
566# CONFIG_MMC is not set 473# CONFIG_MMC is not set
567
568#
569# LED devices
570#
571# CONFIG_NEW_LEDS is not set 474# CONFIG_NEW_LEDS is not set
475# CONFIG_RTC_CLASS is not set
572 476
573# 477#
574# LED drivers 478# DMA Engine support
575# 479#
480# CONFIG_DMA_ENGINE is not set
576 481
577# 482#
578# LED Triggers 483# DMA Clients
579# 484#
580 485
581# 486#
582# InfiniBand support 487# DMA Devices
583# 488#
584 489
585# 490#
586# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 491# Userspace I/O
587# 492#
588 493# CONFIG_UIO is not set
589#
590# Real Time Clock
591#
592# CONFIG_RTC_CLASS is not set
593 494
594# 495#
595# File systems 496# File systems
596# 497#
597CONFIG_EXT2_FS=y 498CONFIG_EXT2_FS=y
598# CONFIG_EXT2_FS_XATTR is not set 499# CONFIG_EXT2_FS_XATTR is not set
599# CONFIG_EXT2_FS_XIP is not set
600# CONFIG_EXT3_FS is not set 500# CONFIG_EXT3_FS is not set
501# CONFIG_EXT4DEV_FS is not set
601# CONFIG_REISERFS_FS is not set 502# CONFIG_REISERFS_FS is not set
602# CONFIG_JFS_FS is not set 503# CONFIG_JFS_FS is not set
603# CONFIG_FS_POSIX_ACL is not set 504# CONFIG_FS_POSIX_ACL is not set
604# CONFIG_XFS_FS is not set 505# CONFIG_XFS_FS is not set
506# CONFIG_GFS2_FS is not set
605# CONFIG_OCFS2_FS is not set 507# CONFIG_OCFS2_FS is not set
606# CONFIG_MINIX_FS is not set 508# CONFIG_MINIX_FS is not set
607CONFIG_ROMFS_FS=y 509CONFIG_ROMFS_FS=y
@@ -629,6 +531,7 @@ CONFIG_ROMFS_FS=y
629# Pseudo filesystems 531# Pseudo filesystems
630# 532#
631CONFIG_PROC_FS=y 533CONFIG_PROC_FS=y
534CONFIG_PROC_SYSCTL=y
632CONFIG_SYSFS=y 535CONFIG_SYSFS=y
633# CONFIG_TMPFS is not set 536# CONFIG_TMPFS is not set
634# CONFIG_HUGETLB_PAGE is not set 537# CONFIG_HUGETLB_PAGE is not set
@@ -645,7 +548,6 @@ CONFIG_RAMFS=y
645# CONFIG_BEFS_FS is not set 548# CONFIG_BEFS_FS is not set
646# CONFIG_BFS_FS is not set 549# CONFIG_BFS_FS is not set
647# CONFIG_EFS_FS is not set 550# CONFIG_EFS_FS is not set
648# CONFIG_JFFS_FS is not set
649# CONFIG_JFFS2_FS is not set 551# CONFIG_JFFS2_FS is not set
650# CONFIG_CRAMFS is not set 552# CONFIG_CRAMFS is not set
651# CONFIG_VXFS_FS is not set 553# CONFIG_VXFS_FS is not set
@@ -664,7 +566,6 @@ CONFIG_RAMFS=y
664# CONFIG_NCP_FS is not set 566# CONFIG_NCP_FS is not set
665# CONFIG_CODA_FS is not set 567# CONFIG_CODA_FS is not set
666# CONFIG_AFS_FS is not set 568# CONFIG_AFS_FS is not set
667# CONFIG_9P_FS is not set
668 569
669# 570#
670# Partition Types 571# Partition Types
@@ -678,15 +579,21 @@ CONFIG_MSDOS_PARTITION=y
678# CONFIG_NLS is not set 579# CONFIG_NLS is not set
679 580
680# 581#
582# Distributed Lock Manager
583#
584# CONFIG_DLM is not set
585
586#
681# Kernel hacking 587# Kernel hacking
682# 588#
683# CONFIG_PRINTK_TIME is not set 589# CONFIG_PRINTK_TIME is not set
590# CONFIG_ENABLE_MUST_CHECK is not set
684# CONFIG_MAGIC_SYSRQ is not set 591# CONFIG_MAGIC_SYSRQ is not set
592# CONFIG_UNUSED_SYMBOLS is not set
593# CONFIG_DEBUG_FS is not set
594# CONFIG_HEADERS_CHECK is not set
685# CONFIG_DEBUG_KERNEL is not set 595# CONFIG_DEBUG_KERNEL is not set
686CONFIG_LOG_BUF_SHIFT=14
687# CONFIG_DEBUG_BUGVERBOSE is not set 596# CONFIG_DEBUG_BUGVERBOSE is not set
688# CONFIG_DEBUG_FS is not set
689# CONFIG_UNWIND_INFO is not set
690# CONFIG_FULLDEBUG is not set 597# CONFIG_FULLDEBUG is not set
691# CONFIG_HIGHPROFILE is not set 598# CONFIG_HIGHPROFILE is not set
692# CONFIG_BOOTPARAM is not set 599# CONFIG_BOOTPARAM is not set
@@ -699,20 +606,16 @@ CONFIG_LOG_BUF_SHIFT=14
699# 606#
700# CONFIG_KEYS is not set 607# CONFIG_KEYS is not set
701# CONFIG_SECURITY is not set 608# CONFIG_SECURITY is not set
702
703#
704# Cryptographic options
705#
706# CONFIG_CRYPTO is not set 609# CONFIG_CRYPTO is not set
707 610
708# 611#
709# Hardware crypto devices
710#
711
712#
713# Library routines 612# Library routines
714# 613#
715# CONFIG_CRC_CCITT is not set 614# CONFIG_CRC_CCITT is not set
716# CONFIG_CRC16 is not set 615# CONFIG_CRC16 is not set
616# CONFIG_CRC_ITU_T is not set
717# CONFIG_CRC32 is not set 617# CONFIG_CRC32 is not set
618# CONFIG_CRC7 is not set
718# CONFIG_LIBCRC32C is not set 619# CONFIG_LIBCRC32C is not set
620CONFIG_HAS_IOMEM=y
621CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 3f86ade3a22a..74bf94948ec2 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -151,27 +151,15 @@ void setup_arch(char **cmdline_p)
151#ifdef CONFIG_ELITE 151#ifdef CONFIG_ELITE
152 printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n"); 152 printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n");
153#endif 153#endif
154#ifdef CONFIG_TELOS
155 printk(KERN_INFO "Modified for Omnia ToolVox by James D. Schettine, james@telos-systems.com\n");
156#endif
157#endif 154#endif
158 printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); 155 printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
159 156
160#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ) 157#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 )
161 printk(KERN_INFO "TRG SuperPilot FLASH card support <info@trgnet.com>\n"); 158 printk(KERN_INFO "TRG SuperPilot FLASH card support <info@trgnet.com>\n");
162#endif 159#endif
163
164#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 ) 160#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 )
165 printk(KERN_INFO "PalmV support by Lineo Inc. <jeff@uclinux.com>\n"); 161 printk(KERN_INFO "PalmV support by Lineo Inc. <jeff@uclinux.com>\n");
166#endif 162#endif
167
168#ifdef CONFIG_M68EZ328ADS
169 printk(KERN_INFO "M68EZ328ADS board support (C) 1999 Vladimir Gurevich <vgurevic@cisco.com>\n");
170#endif
171
172#ifdef CONFIG_ALMA_ANS
173 printk(KERN_INFO "Alma Electronics board support (C) 1999 Vladimir Gurevich <vgurevic@cisco.com>\n");
174#endif
175#if defined (CONFIG_M68360) 163#if defined (CONFIG_M68360)
176 printk(KERN_INFO "QUICC port done by SED Systems <hamilton@sedsystems.ca>,\n"); 164 printk(KERN_INFO "QUICC port done by SED Systems <hamilton@sedsystems.ca>,\n");
177 printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. <mleslie@lineo.com>.\n"); 165 printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. <mleslie@lineo.com>.\n");
@@ -188,11 +176,9 @@ void setup_arch(char **cmdline_p)
188 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, 176 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
189 (int) &_sdata, (int) &_edata, 177 (int) &_sdata, (int) &_edata,
190 (int) &_sbss, (int) &_ebss); 178 (int) &_sbss, (int) &_ebss);
191 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " 179 printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
192 "STACK=0x%06x-0x%06x\n",
193 (int) &_ebss, (int) memory_start, 180 (int) &_ebss, (int) memory_start,
194 (int) memory_start, (int) memory_end, 181 (int) memory_start, (int) memory_end);
195 (int) memory_end, (int) _ramend);
196#endif 182#endif
197 183
198 /* Keep a copy of command line */ 184 /* Keep a copy of command line */
@@ -287,12 +273,3 @@ struct seq_operations cpuinfo_op = {
287 .show = show_cpuinfo, 273 .show = show_cpuinfo,
288}; 274};
289 275
290void arch_gettod(int *year, int *mon, int *day, int *hour,
291 int *min, int *sec)
292{
293 if (mach_gettod)
294 mach_gettod(year, mon, day, hour, min, sec);
295 else
296 *year = *mon = *day = *hour = *min = *sec = 0;
297}
298
diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
index 437f8c6c14a0..70371378db86 100644
--- a/arch/m68knommu/kernel/signal.c
+++ b/arch/m68knommu/kernel/signal.c
@@ -781,15 +781,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
781 /* Did we come from a system call? */ 781 /* Did we come from a system call? */
782 if (regs->orig_d0 >= 0) { 782 if (regs->orig_d0 >= 0) {
783 /* Restart the system call - no handlers present */ 783 /* Restart the system call - no handlers present */
784 if (regs->d0 == -ERESTARTNOHAND 784 handle_restart(regs, NULL, 0);
785 || regs->d0 == -ERESTARTSYS
786 || regs->d0 == -ERESTARTNOINTR) {
787 regs->d0 = regs->orig_d0;
788 regs->pc -= 2;
789 } else if (regs->d0 == -ERESTART_RESTARTBLOCK) {
790 regs->d0 = __NR_restart_syscall;
791 regs->pc -= 2;
792 }
793 } 785 }
794 return 0; 786 return 0;
795} 787}
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index 467053da2d08..77e5375a2dd5 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -27,7 +27,6 @@
27 27
28#define TICK_SIZE (tick_nsec / 1000) 28#define TICK_SIZE (tick_nsec / 1000)
29 29
30
31static inline int set_rtc_mmss(unsigned long nowtime) 30static inline int set_rtc_mmss(unsigned long nowtime)
32{ 31{
33 if (mach_set_clock_mmss) 32 if (mach_set_clock_mmss)
@@ -39,15 +38,11 @@ static inline int set_rtc_mmss(unsigned long nowtime)
39 * timer_interrupt() needs to keep up the real-time clock, 38 * timer_interrupt() needs to keep up the real-time clock,
40 * as well as call the "do_timer()" routine every clocktick 39 * as well as call the "do_timer()" routine every clocktick
41 */ 40 */
42static irqreturn_t timer_interrupt(int irq, void *dummy) 41irqreturn_t arch_timer_interrupt(int irq, void *dummy)
43{ 42{
44 /* last time the cmos clock got updated */ 43 /* last time the cmos clock got updated */
45 static long last_rtc_update=0; 44 static long last_rtc_update=0;
46 45
47 /* may need to kick the hardware timer */
48 if (mach_tick)
49 mach_tick();
50
51 write_seqlock(&xtime_lock); 46 write_seqlock(&xtime_lock);
52 47
53 do_timer(1); 48 do_timer(1);
@@ -103,10 +98,10 @@ void time_init(void)
103{ 98{
104 unsigned int year, mon, day, hour, min, sec; 99 unsigned int year, mon, day, hour, min, sec;
105 100
106 extern void arch_gettod(int *year, int *mon, int *day, int *hour, 101 if (mach_gettod)
107 int *min, int *sec); 102 mach_gettod(&year, &mon, &day, &hour, &min, &sec);
108 103 else
109 arch_gettod(&year, &mon, &day, &hour, &min, &sec); 104 year = mon = day = hour = min = sec = 0;
110 105
111 if ((year += 1900) < 1970) 106 if ((year += 1900) < 1970)
112 year += 100; 107 year += 100;
@@ -114,7 +109,7 @@ void time_init(void)
114 xtime.tv_nsec = 0; 109 xtime.tv_nsec = 0;
115 wall_to_monotonic.tv_sec = -xtime.tv_sec; 110 wall_to_monotonic.tv_sec = -xtime.tv_sec;
116 111
117 mach_sched_init(timer_interrupt); 112 hw_timer_init();
118} 113}
119 114
120/* 115/*
@@ -128,7 +123,7 @@ void do_gettimeofday(struct timeval *tv)
128 123
129 do { 124 do {
130 seq = read_seqbegin_irqsave(&xtime_lock, flags); 125 seq = read_seqbegin_irqsave(&xtime_lock, flags);
131 usec = mach_gettimeoffset ? mach_gettimeoffset() : 0; 126 usec = hw_timer_offset();
132 sec = xtime.tv_sec; 127 sec = xtime.tv_sec;
133 usec += (xtime.tv_nsec / 1000); 128 usec += (xtime.tv_nsec / 1000);
134 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); 129 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
@@ -160,8 +155,7 @@ int do_settimeofday(struct timespec *tv)
160 * Discover what correction gettimeofday 155 * Discover what correction gettimeofday
161 * would have done, and then undo it! 156 * would have done, and then undo it!
162 */ 157 */
163 if (mach_gettimeoffset) 158 nsec -= (hw_timer_offset() * 1000);
164 nsec -= (mach_gettimeoffset() * 1000);
165 159
166 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); 160 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
167 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); 161 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index d0f2dc5cb5a1..b3c4dd4cc135 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -10,13 +10,10 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h> 19#include <asm/mcftimer.h>
@@ -25,9 +22,6 @@
25 22
26/***************************************************************************/ 23/***************************************************************************/
27 24
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 25void coldfire_reset(void);
32 26
33/***************************************************************************/ 27/***************************************************************************/
@@ -97,9 +91,6 @@ int mcf_timerirqpending(int timer)
97void config_BSP(char *commandp, int size) 91void config_BSP(char *commandp, int size)
98{ 92{
99 mcf_setimr(MCFSIM_IMR_MASKALL); 93 mcf_setimr(MCFSIM_IMR_MASKALL);
100 mach_sched_init = coldfire_timer_init;
101 mach_tick = coldfire_tick;
102 mach_gettimeoffset = coldfire_timer_offset;
103 mach_reset = coldfire_reset; 94 mach_reset = coldfire_reset;
104} 95}
105 96
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 425703fb6cee..f84a4aea8cb6 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -9,23 +9,16 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h>
13#include <linux/param.h> 12#include <linux/param.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
15#include <asm/irq.h>
16#include <asm/dma.h> 14#include <asm/dma.h>
17#include <asm/traps.h>
18#include <asm/machdep.h> 15#include <asm/machdep.h>
19#include <asm/coldfire.h> 16#include <asm/coldfire.h>
20#include <asm/mcftimer.h>
21#include <asm/mcfsim.h> 17#include <asm/mcfsim.h>
22#include <asm/mcfdma.h> 18#include <asm/mcfdma.h>
23 19
24/***************************************************************************/ 20/***************************************************************************/
25 21
26void coldfire_tick(void);
27void coldfire_timer_init(irq_handler_t handler);
28unsigned long coldfire_timer_offset(void);
29void coldfire_reset(void); 22void coldfire_reset(void);
30 23
31/***************************************************************************/ 24/***************************************************************************/
@@ -102,9 +95,6 @@ void config_BSP(char *commandp, int size)
102 commandp[size-1] = 0; 95 commandp[size-1] = 0;
103#endif /* CONFIG_NETtel */ 96#endif /* CONFIG_NETtel */
104 97
105 mach_sched_init = coldfire_timer_init;
106 mach_tick = coldfire_tick;
107 mach_gettimeoffset = coldfire_timer_offset;
108 mach_reset = coldfire_reset; 98 mach_reset = coldfire_reset;
109} 99}
110 100
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index a2c95bebd004..6edbd41261cc 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -27,9 +27,6 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
27 27
28/***************************************************************************/ 28/***************************************************************************/
29 29
30void coldfire_pit_tick(void);
31void coldfire_pit_init(irq_handler_t handler);
32unsigned long coldfire_pit_offset(void);
33void coldfire_reset(void); 30void coldfire_reset(void);
34 31
35/***************************************************************************/ 32/***************************************************************************/
@@ -47,10 +44,7 @@ void mcf_autovector(unsigned int vec)
47 44
48void config_BSP(char *commandp, int size) 45void config_BSP(char *commandp, int size)
49{ 46{
50 mach_sched_init = coldfire_pit_init; 47 mach_reset = coldfire_reset;
51 mach_tick = coldfire_pit_tick;
52 mach_gettimeoffset = coldfire_pit_offset;
53 mach_reset = coldfire_reset;
54} 48}
55 49
56/***************************************************************************/ 50/***************************************************************************/
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 0a3af05a434b..e7f80c8e8636 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index dc2c362590c2..d4d39435cb15 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -9,24 +9,17 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h>
13#include <linux/param.h> 12#include <linux/param.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <asm/irq.h>
17#include <asm/dma.h> 15#include <asm/dma.h>
18#include <asm/traps.h>
19#include <asm/machdep.h> 16#include <asm/machdep.h>
20#include <asm/coldfire.h> 17#include <asm/coldfire.h>
21#include <asm/mcftimer.h>
22#include <asm/mcfsim.h> 18#include <asm/mcfsim.h>
23#include <asm/mcfdma.h> 19#include <asm/mcfdma.h>
24 20
25/***************************************************************************/ 21/***************************************************************************/
26 22
27void coldfire_tick(void);
28void coldfire_timer_init(irq_handler_t handler);
29unsigned long coldfire_timer_offset(void);
30void coldfire_reset(void); 23void coldfire_reset(void);
31 24
32/***************************************************************************/ 25/***************************************************************************/
@@ -95,9 +88,6 @@ int mcf_timerirqpending(int timer)
95void config_BSP(char *commandp, int size) 88void config_BSP(char *commandp, int size)
96{ 89{
97 mcf_setimr(MCFSIM_IMR_MASKALL); 90 mcf_setimr(MCFSIM_IMR_MASKALL);
98 mach_sched_init = coldfire_timer_init;
99 mach_tick = coldfire_tick;
100 mach_gettimeoffset = coldfire_timer_offset;
101 mach_reset = coldfire_reset; 91 mach_reset = coldfire_reset;
102} 92}
103 93
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 1365a8300d5d..634a6375e4a5 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -10,24 +10,17 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25 21
26/***************************************************************************/ 22/***************************************************************************/
27 23
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 24void coldfire_reset(void);
32 25
33extern unsigned int mcf_timervector; 26extern unsigned int mcf_timervector;
@@ -128,9 +121,6 @@ void config_BSP(char *commandp, int size)
128 121
129 mcf_timervector = 69; 122 mcf_timervector = 69;
130 mcf_profilevector = 70; 123 mcf_profilevector = 70;
131 mach_sched_init = coldfire_timer_init;
132 mach_tick = coldfire_tick;
133 mach_gettimeoffset = coldfire_timer_offset;
134 mach_reset = coldfire_reset; 124 mach_reset = coldfire_reset;
135} 125}
136 126
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 1b820441419a..9cbfbc68ae4f 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index a089e9513699..acbd43486d97 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index e3461619fd65..6040821e637d 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -10,25 +10,18 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25#include <asm/mcfwdebug.h> 21#include <asm/mcfwdebug.h>
26 22
27/***************************************************************************/ 23/***************************************************************************/
28 24
29void coldfire_tick(void);
30void coldfire_timer_init(irq_handler_t handler);
31unsigned long coldfire_timer_offset(void);
32void coldfire_reset(void); 25void coldfire_reset(void);
33 26
34extern unsigned int mcf_timervector; 27extern unsigned int mcf_timervector;
@@ -122,9 +115,6 @@ void config_BSP(char *commandp, int size)
122 mcf_timerlevel = 6; 115 mcf_timerlevel = 6;
123#endif 116#endif
124 117
125 mach_sched_init = coldfire_timer_init;
126 mach_tick = coldfire_tick;
127 mach_gettimeoffset = coldfire_timer_offset;
128 mach_reset = coldfire_reset; 118 mach_reset = coldfire_reset;
129 119
130#ifdef MCF_BDM_DISABLE 120#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index a8cd867805ca..b333731b875a 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -74,7 +74,8 @@ ENTRY(system_call)
74 movel %sp,%d2 /* get thread_info pointer */ 74 movel %sp,%d2 /* get thread_info pointer */
75 andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ 75 andl #-THREAD_SIZE,%d2 /* at start of kernel stack */
76 movel %d2,%a0 76 movel %d2,%a0
77 movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ 77 movel %a0@,%a1 /* save top of frame */
78 movel %sp,%a1@(TASK_THREAD+THREAD_ESP0)
78 btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) 79 btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
79 bnes 1f 80 bnes 1f
80 81
@@ -83,6 +84,8 @@ ENTRY(system_call)
83 movel %d0,%sp@(PT_D0) /* save the return value */ 84 movel %d0,%sp@(PT_D0) /* save the return value */
84 jra ret_from_exception 85 jra ret_from_exception
851: 861:
87 movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */
88 movel %d2,PT_D0(%sp) /* on syscall entry */
86 subql #4,%sp 89 subql #4,%sp
87 SAVE_SWITCH_STACK 90 SAVE_SWITCH_STACK
88 jbsr syscall_trace 91 jbsr syscall_trace
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index f18352fa35a6..173b754d1cda 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <asm/machdep.h>
20#include <asm/io.h> 21#include <asm/io.h>
21#include <asm/coldfire.h> 22#include <asm/coldfire.h>
22#include <asm/mcfpit.h> 23#include <asm/mcfpit.h>
@@ -31,28 +32,30 @@
31 32
32/***************************************************************************/ 33/***************************************************************************/
33 34
34void coldfire_pit_tick(void) 35static irqreturn_t hw_tick(int irq, void *dummy)
35{ 36{
36 unsigned short pcsr; 37 unsigned short pcsr;
37 38
38 /* Reset the ColdFire timer */ 39 /* Reset the ColdFire timer */
39 pcsr = __raw_readw(TA(MCFPIT_PCSR)); 40 pcsr = __raw_readw(TA(MCFPIT_PCSR));
40 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); 41 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR));
42
43 return arch_timer_interrupt(irq, dummy);
41} 44}
42 45
43/***************************************************************************/ 46/***************************************************************************/
44 47
45static struct irqaction coldfire_pit_irq = { 48static struct irqaction coldfire_pit_irq = {
46 .name = "timer", 49 .name = "timer",
47 .flags = IRQF_DISABLED | IRQF_TIMER, 50 .flags = IRQF_DISABLED | IRQF_TIMER,
51 .handler = hw_tick,
48}; 52};
49 53
50void coldfire_pit_init(irq_handler_t handler) 54void hw_timer_init(void)
51{ 55{
52 volatile unsigned char *icrp; 56 volatile unsigned char *icrp;
53 volatile unsigned long *imrp; 57 volatile unsigned long *imrp;
54 58
55 coldfire_pit_irq.handler = handler;
56 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq); 59 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq);
57 60
58 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 61 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
@@ -71,7 +74,7 @@ void coldfire_pit_init(irq_handler_t handler)
71 74
72/***************************************************************************/ 75/***************************************************************************/
73 76
74unsigned long coldfire_pit_offset(void) 77unsigned long hw_timer_offset(void)
75{ 78{
76 volatile unsigned long *ipr; 79 volatile unsigned long *ipr;
77 unsigned long pmr, pcntr, offset; 80 unsigned long pmr, pcntr, offset;
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index 64bd0ff9029e..489dec85c859 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -9,10 +9,9 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <linux/param.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/init.h>
16#include <linux/irq.h> 15#include <linux/irq.h>
17#include <asm/io.h> 16#include <asm/io.h>
18#include <asm/traps.h> 17#include <asm/traps.h>
@@ -54,24 +53,28 @@ extern int mcf_timerirqpending(int timer);
54 53
55/***************************************************************************/ 54/***************************************************************************/
56 55
57void coldfire_tick(void) 56static irqreturn_t hw_tick(int irq, void *dummy)
58{ 57{
59 /* Reset the ColdFire timer */ 58 /* Reset the ColdFire timer */
60 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); 59 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER));
60
61 return arch_timer_interrupt(irq, dummy);
61} 62}
62 63
63/***************************************************************************/ 64/***************************************************************************/
64 65
65static struct irqaction coldfire_timer_irq = { 66static struct irqaction coldfire_timer_irq = {
66 .name = "timer", 67 .name = "timer",
67 .flags = IRQF_DISABLED | IRQF_TIMER, 68 .flags = IRQF_DISABLED | IRQF_TIMER,
69 .handler = hw_tick,
68}; 70};
69 71
72/***************************************************************************/
73
70static int ticks_per_intr; 74static int ticks_per_intr;
71 75
72void coldfire_timer_init(irq_handler_t handler) 76void hw_timer_init(void)
73{ 77{
74 coldfire_timer_irq.handler = handler;
75 setup_irq(mcf_timervector, &coldfire_timer_irq); 78 setup_irq(mcf_timervector, &coldfire_timer_irq);
76 79
77 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 80 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
@@ -89,7 +92,7 @@ void coldfire_timer_init(irq_handler_t handler)
89 92
90/***************************************************************************/ 93/***************************************************************************/
91 94
92unsigned long coldfire_timer_offset(void) 95unsigned long hw_timer_offset(void)
93{ 96{
94 unsigned long tcn, offset; 97 unsigned long tcn, offset;
95 98
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index b32c6425f821..f77328b7b6db 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -18,25 +18,18 @@
18/***************************************************************************/ 18/***************************************************************************/
19 19
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/sched.h>
22#include <linux/param.h> 21#include <linux/param.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <asm/irq.h>
26#include <asm/dma.h> 24#include <asm/dma.h>
27#include <asm/traps.h>
28#include <asm/machdep.h> 25#include <asm/machdep.h>
29#include <asm/coldfire.h> 26#include <asm/coldfire.h>
30#include <asm/mcftimer.h>
31#include <asm/mcfsim.h> 27#include <asm/mcfsim.h>
32#include <asm/mcfdma.h> 28#include <asm/mcfdma.h>
33#include <asm/mcfwdebug.h> 29#include <asm/mcfwdebug.h>
34 30
35/***************************************************************************/ 31/***************************************************************************/
36 32
37void coldfire_tick(void);
38void coldfire_timer_init(irq_handler_t handler);
39unsigned long coldfire_timer_offset(void);
40void coldfire_reset(void); 33void coldfire_reset(void);
41 34
42extern unsigned int mcf_timervector; 35extern unsigned int mcf_timervector;
@@ -104,9 +97,6 @@ void config_BSP(char *commandp, int size)
104 97
105 mcf_timervector = 64+32; 98 mcf_timervector = 64+32;
106 mcf_profilevector = 64+33; 99 mcf_profilevector = 64+33;
107 mach_sched_init = coldfire_timer_init;
108 mach_tick = coldfire_tick;
109 mach_gettimeoffset = coldfire_timer_offset;
110 mach_reset = coldfire_reset; 100 mach_reset = coldfire_reset;
111 101
112#ifdef MCF_BDM_DISABLE 102#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index e692536817d8..2d3b62eba7ca 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -10,24 +10,17 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25 21
26/***************************************************************************/ 22/***************************************************************************/
27 23
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 24void coldfire_reset(void);
32 25
33extern unsigned int mcf_timervector; 26extern unsigned int mcf_timervector;
@@ -108,9 +101,6 @@ void config_BSP(char *commandp, int size)
108 mcf_timerlevel = 6; 101 mcf_timerlevel = 6;
109#endif 102#endif
110 103
111 mach_sched_init = coldfire_timer_init;
112 mach_tick = coldfire_tick;
113 mach_gettimeoffset = coldfire_timer_offset;
114 mach_reset = coldfire_reset; 104 mach_reset = coldfire_reset;
115} 105}
116 106
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index b0b034c4654f..b1b40527658b 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -13,6 +13,7 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/scatterlist.h>
16 17
17#include <asm/cache.h> 18#include <asm/cache.h>
18#include <asm/io.h> 19#include <asm/io.h>
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index 41f8e321e34c..9448d4e91142 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -25,6 +25,7 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/string.h> 26#include <linux/string.h>
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/scatterlist.h>
28 29
29#include <asm/cacheflush.h> 30#include <asm/cacheflush.h>
30#include <asm/dma.h> /* for DMA_CHUNK_SIZE */ 31#include <asm/dma.h> /* for DMA_CHUNK_SIZE */
diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c
index 78e8277df655..b70324e0d83d 100644
--- a/arch/sparc64/kernel/iommu_common.c
+++ b/arch/sparc64/kernel/iommu_common.c
@@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents)
233 dma_sg->dma_address = dent_addr; 233 dma_sg->dma_address = dent_addr;
234 dma_sg->dma_length = dent_len; 234 dma_sg->dma_length = dent_len;
235 235
236 if (dma_sg != sg) {
237 dma_sg = next_sg(dma_sg);
238 dma_sg->dma_length = 0;
239 }
240
236 return ((unsigned long) dent_addr + 241 return ((unsigned long) dent_addr +
237 (unsigned long) dent_len + 242 (unsigned long) dent_len +
238 (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; 243 (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT;