diff options
54 files changed, 201 insertions, 170 deletions
diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig index 216ad00948af..9405e32783de 100644 --- a/arch/arm/configs/n8x0_defconfig +++ b/arch/arm/configs/n8x0_defconfig  | |||
| @@ -1058,7 +1058,6 @@ CONFIG_JFFS2_CMODE_PRIORITY=y | |||
| 1058 | # CONFIG_ROMFS_FS is not set | 1058 | # CONFIG_ROMFS_FS is not set | 
| 1059 | # CONFIG_SYSV_FS is not set | 1059 | # CONFIG_SYSV_FS is not set | 
| 1060 | # CONFIG_UFS_FS is not set | 1060 | # CONFIG_UFS_FS is not set | 
| 1061 | # CONFIG_NILFS2_FS is not set | ||
| 1062 | CONFIG_NETWORK_FILESYSTEMS=y | 1061 | CONFIG_NETWORK_FILESYSTEMS=y | 
| 1063 | # CONFIG_NFS_FS is not set | 1062 | # CONFIG_NFS_FS is not set | 
| 1064 | # CONFIG_NFSD is not set | 1063 | # CONFIG_NFSD is not set | 
diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig index f5c6e11cf189..881faea03d79 100644 --- a/arch/arm/configs/omap_zoom2_defconfig +++ b/arch/arm/configs/omap_zoom2_defconfig  | |||
| @@ -661,7 +661,7 @@ CONFIG_DEVKMEM=y | |||
| 661 | CONFIG_SERIAL_8250=y | 661 | CONFIG_SERIAL_8250=y | 
| 662 | CONFIG_SERIAL_8250_CONSOLE=y | 662 | CONFIG_SERIAL_8250_CONSOLE=y | 
| 663 | CONFIG_SERIAL_8250_NR_UARTS=32 | 663 | CONFIG_SERIAL_8250_NR_UARTS=32 | 
| 664 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 664 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 | 
| 665 | CONFIG_SERIAL_8250_EXTENDED=y | 665 | CONFIG_SERIAL_8250_EXTENDED=y | 
| 666 | CONFIG_SERIAL_8250_MANY_PORTS=y | 666 | CONFIG_SERIAL_8250_MANY_PORTS=y | 
| 667 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 667 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 
diff --git a/arch/arm/configs/omap_zoom3_defconfig b/arch/arm/configs/omap_zoom3_defconfig index ea9a5012d332..5e55b550a408 100644 --- a/arch/arm/configs/omap_zoom3_defconfig +++ b/arch/arm/configs/omap_zoom3_defconfig  | |||
| @@ -680,7 +680,7 @@ CONFIG_DEVKMEM=y | |||
| 680 | CONFIG_SERIAL_8250=y | 680 | CONFIG_SERIAL_8250=y | 
| 681 | CONFIG_SERIAL_8250_CONSOLE=y | 681 | CONFIG_SERIAL_8250_CONSOLE=y | 
| 682 | CONFIG_SERIAL_8250_NR_UARTS=32 | 682 | CONFIG_SERIAL_8250_NR_UARTS=32 | 
| 683 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 683 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 | 
| 684 | CONFIG_SERIAL_8250_EXTENDED=y | 684 | CONFIG_SERIAL_8250_EXTENDED=y | 
| 685 | CONFIG_SERIAL_8250_MANY_PORTS=y | 685 | CONFIG_SERIAL_8250_MANY_PORTS=y | 
| 686 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 686 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 
diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig index 45135ffadc57..473f9e13f08b 100644 --- a/arch/arm/configs/rx51_defconfig +++ b/arch/arm/configs/rx51_defconfig  | |||
| @@ -59,8 +59,6 @@ CONFIG_FAIR_GROUP_SCHED=y | |||
| 59 | CONFIG_USER_SCHED=y | 59 | CONFIG_USER_SCHED=y | 
| 60 | # CONFIG_CGROUP_SCHED is not set | 60 | # CONFIG_CGROUP_SCHED is not set | 
| 61 | # CONFIG_CGROUPS is not set | 61 | # CONFIG_CGROUPS is not set | 
| 62 | CONFIG_SYSFS_DEPRECATED=y | ||
| 63 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
| 64 | # CONFIG_RELAY is not set | 62 | # CONFIG_RELAY is not set | 
| 65 | # CONFIG_NAMESPACES is not set | 63 | # CONFIG_NAMESPACES is not set | 
| 66 | CONFIG_BLK_DEV_INITRD=y | 64 | CONFIG_BLK_DEV_INITRD=y | 
| @@ -480,7 +478,6 @@ CONFIG_BT_HIDP=m | |||
| 480 | # CONFIG_BT_HCIBFUSB is not set | 478 | # CONFIG_BT_HCIBFUSB is not set | 
| 481 | # CONFIG_BT_HCIVHCI is not set | 479 | # CONFIG_BT_HCIVHCI is not set | 
| 482 | # CONFIG_AF_RXRPC is not set | 480 | # CONFIG_AF_RXRPC is not set | 
| 483 | # CONFIG_PHONET is not set | ||
| 484 | CONFIG_WIRELESS=y | 481 | CONFIG_WIRELESS=y | 
| 485 | CONFIG_CFG80211=y | 482 | CONFIG_CFG80211=y | 
| 486 | # CONFIG_CFG80211_REG_DEBUG is not set | 483 | # CONFIG_CFG80211_REG_DEBUG is not set | 
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 9ad118563f7d..20cfbcc6c60c 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c  | |||
| @@ -68,12 +68,6 @@ struct sys_timer omap_timer; | |||
| 68 | * --------------------------------------------------------------------------- | 68 | * --------------------------------------------------------------------------- | 
| 69 | */ | 69 | */ | 
| 70 | 70 | ||
| 71 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
| 72 | #define TIMER_32K_SYNCHRONIZED 0xfffbc410 | ||
| 73 | #else | ||
| 74 | #error OMAP 32KHz timer does not currently work on 15XX! | ||
| 75 | #endif | ||
| 76 | |||
| 77 | /* 16xx specific defines */ | 71 | /* 16xx specific defines */ | 
| 78 | #define OMAP1_32K_TIMER_BASE 0xfffb9000 | 72 | #define OMAP1_32K_TIMER_BASE 0xfffb9000 | 
| 79 | #define OMAP1_32K_TIMER_CR 0x08 | 73 | #define OMAP1_32K_TIMER_CR 0x08 | 
| @@ -150,15 +144,6 @@ static struct clock_event_device clockevent_32k_timer = { | |||
| 150 | .set_mode = omap_32k_timer_set_mode, | 144 | .set_mode = omap_32k_timer_set_mode, | 
| 151 | }; | 145 | }; | 
| 152 | 146 | ||
| 153 | /* | ||
| 154 | * The 32KHz synchronized timer is an additional timer on 16xx. | ||
| 155 | * It is always running. | ||
| 156 | */ | ||
| 157 | static inline unsigned long omap_32k_sync_timer_read(void) | ||
| 158 | { | ||
| 159 | return omap_readl(TIMER_32K_SYNCHRONIZED); | ||
| 160 | } | ||
| 161 | |||
| 162 | static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) | 147 | static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) | 
| 163 | { | 148 | { | 
| 164 | struct clock_event_device *evt = &clockevent_32k_timer; | 149 | struct clock_event_device *evt = &clockevent_32k_timer; | 
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index a8a3d1e23e26..2455dcc744a0 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig  | |||
| @@ -59,8 +59,10 @@ config MACH_OMAP3_BEAGLE | |||
| 59 | select OMAP_PACKAGE_CBB | 59 | select OMAP_PACKAGE_CBB | 
| 60 | 60 | ||
| 61 | config MACH_DEVKIT8000 | 61 | config MACH_DEVKIT8000 | 
| 62 | bool "DEVKIT8000 board" | 62 | bool "DEVKIT8000 board" | 
| 63 | depends on ARCH_OMAP3 | 63 | depends on ARCH_OMAP3 | 
| 64 | select OMAP_PACKAGE_CUS | ||
| 65 | select OMAP_MUX | ||
| 64 | 66 | ||
| 65 | config MACH_OMAP_LDP | 67 | config MACH_OMAP_LDP | 
| 66 | bool "OMAP3 LDP board" | 68 | bool "OMAP3 LDP board" | 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index a0a2a113465c..504d2bd222fe 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c  | |||
| @@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 96 | static void __init omap_sdp_init(void) | 96 | static void __init omap_sdp_init(void) | 
| 97 | { | 97 | { | 
| 98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 
| 99 | omap_serial_init(); | ||
| 99 | zoom_peripherals_init(); | 100 | zoom_peripherals_init(); | 
| 100 | board_smc91x_init(); | 101 | board_smc91x_init(); | 
| 101 | enable_board_wakeup_source(); | 102 | enable_board_wakeup_source(); | 
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 6ae880585d54..c1c4389fbd8f 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c  | |||
| @@ -294,9 +294,9 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 294 | 294 | ||
| 295 | static void __init am3517_evm_init(void) | 295 | static void __init am3517_evm_init(void) | 
| 296 | { | 296 | { | 
| 297 | am3517_evm_i2c_init(); | ||
| 298 | |||
| 299 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 297 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 
| 298 | |||
| 299 | am3517_evm_i2c_init(); | ||
| 300 | platform_add_devices(am3517_evm_devices, | 300 | platform_add_devices(am3517_evm_devices, | 
| 301 | ARRAY_SIZE(am3517_evm_devices)); | 301 | ARRAY_SIZE(am3517_evm_devices)); | 
| 302 | 302 | ||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 5bfc13b3176c..47e3af2166d4 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c  | |||
| @@ -50,7 +50,6 @@ | |||
| 50 | #include <linux/input/matrix_keypad.h> | 50 | #include <linux/input/matrix_keypad.h> | 
| 51 | #include <linux/spi/spi.h> | 51 | #include <linux/spi/spi.h> | 
| 52 | #include <linux/spi/ads7846.h> | 52 | #include <linux/spi/ads7846.h> | 
| 53 | #include <linux/usb/otg.h> | ||
| 54 | #include <linux/dm9000.h> | 53 | #include <linux/dm9000.h> | 
| 55 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> | 
| 56 | 55 | ||
| @@ -269,20 +268,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
| 269 | devkit8000_vmmc1_supply.dev = mmc[0].dev; | 268 | devkit8000_vmmc1_supply.dev = mmc[0].dev; | 
| 270 | devkit8000_vsim_supply.dev = mmc[0].dev; | 269 | devkit8000_vsim_supply.dev = mmc[0].dev; | 
| 271 | 270 | ||
| 272 | /* REVISIT: need ehci-omap hooks for external VBUS | ||
| 273 | * power switch and overcurrent detect | ||
| 274 | */ | ||
| 275 | |||
| 276 | gpio_request(gpio + 1, "EHCI_nOC"); | ||
| 277 | gpio_direction_input(gpio + 1); | ||
| 278 | |||
| 279 | /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ | ||
| 280 | gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); | ||
| 281 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); | ||
| 282 | |||
| 283 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | ||
| 284 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
| 285 | |||
| 286 | return 0; | 271 | return 0; | 
| 287 | } | 272 | } | 
| 288 | 273 | ||
| @@ -303,7 +288,7 @@ static struct regulator_consumer_supply devkit8000_vpll2_supplies[] = { | |||
| 303 | .dev = &devkit8000_lcd_device.dev, | 288 | .dev = &devkit8000_lcd_device.dev, | 
| 304 | }, | 289 | }, | 
| 305 | { | 290 | { | 
| 306 | .supply = "vdss_dsi", | 291 | .supply = "vdds_dsi", | 
| 307 | .dev = &devkit8000_dss_device.dev, | 292 | .dev = &devkit8000_dss_device.dev, | 
| 308 | } | 293 | } | 
| 309 | }; | 294 | }; | 
| @@ -639,17 +624,21 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 639 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 624 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 
| 640 | 625 | ||
| 641 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 626 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 
| 642 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 627 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 
| 643 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 628 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 
| 644 | 629 | ||
| 645 | .phy_reset = true, | 630 | .phy_reset = true, | 
| 646 | .reset_gpio_port[0] = -EINVAL, | 631 | .reset_gpio_port[0] = -EINVAL, | 
| 647 | .reset_gpio_port[1] = 147, | 632 | .reset_gpio_port[1] = -EINVAL, | 
| 648 | .reset_gpio_port[2] = -EINVAL | 633 | .reset_gpio_port[2] = -EINVAL | 
| 649 | }; | 634 | }; | 
| 650 | 635 | ||
| 651 | static void __init devkit8000_init(void) | 636 | static void __init devkit8000_init(void) | 
| 652 | { | 637 | { | 
| 638 | omap_serial_init(); | ||
| 639 | |||
| 640 | omap_dm9000_init(); | ||
| 641 | |||
| 653 | devkit8000_i2c_init(); | 642 | devkit8000_i2c_init(); | 
| 654 | platform_add_devices(devkit8000_devices, | 643 | platform_add_devices(devkit8000_devices, | 
| 655 | ARRAY_SIZE(devkit8000_devices)); | 644 | ARRAY_SIZE(devkit8000_devices)); | 
| @@ -659,25 +648,15 @@ static void __init devkit8000_init(void) | |||
| 659 | spi_register_board_info(devkit8000_spi_board_info, | 648 | spi_register_board_info(devkit8000_spi_board_info, | 
| 660 | ARRAY_SIZE(devkit8000_spi_board_info)); | 649 | ARRAY_SIZE(devkit8000_spi_board_info)); | 
| 661 | 650 | ||
| 662 | omap_serial_init(); | ||
| 663 | |||
| 664 | omap_dm9000_init(); | ||
| 665 | |||
| 666 | devkit8000_ads7846_init(); | 651 | devkit8000_ads7846_init(); | 
| 667 | 652 | ||
| 668 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); | ||
| 669 | |||
| 670 | gpio_request(170, "DVI_nPD"); | ||
| 671 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
| 672 | gpio_direction_output(170, true); | ||
| 673 | |||
| 674 | usb_musb_init(&musb_board_data); | 653 | usb_musb_init(&musb_board_data); | 
| 675 | usb_ehci_init(&ehci_pdata); | 654 | usb_ehci_init(&ehci_pdata); | 
| 676 | devkit8000_flash_init(); | 655 | devkit8000_flash_init(); | 
| 677 | 656 | ||
| 678 | /* Ensure SDRC pins are mux'd for self-refresh */ | 657 | /* Ensure SDRC pins are mux'd for self-refresh */ | 
| 679 | omap_mux_init_signal("sdr_cke0", OMAP_PIN_OUTPUT); | 658 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 
| 680 | omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT); | 659 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 
| 681 | } | 660 | } | 
| 682 | 661 | ||
| 683 | static void __init devkit8000_map_io(void) | 662 | static void __init devkit8000_map_io(void) | 
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 3c7789d45051..d55c57b761a9 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c  | |||
| @@ -458,13 +458,13 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 458 | }; | 458 | }; | 
| 459 | 459 | ||
| 460 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 460 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 
| 461 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 461 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 
| 462 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 462 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 
| 463 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 463 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 
| 464 | 464 | ||
| 465 | .phy_reset = true, | 465 | .phy_reset = true, | 
| 466 | .reset_gpio_port[0] = -EINVAL, | 466 | .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET, | 
| 467 | .reset_gpio_port[1] = IGEP2_GPIO_USBH_NRESET, | 467 | .reset_gpio_port[1] = -EINVAL, | 
| 468 | .reset_gpio_port[2] = -EINVAL, | 468 | .reset_gpio_port[2] = -EINVAL, | 
| 469 | }; | 469 | }; | 
| 470 | 470 | ||
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index da9bcb898991..3ccc34ebdcc7 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c  | |||
| @@ -216,7 +216,7 @@ static void __init n8x0_onenand_init(void) {} | |||
| 216 | */ | 216 | */ | 
| 217 | #define N8X0_SLOT_SWITCH_GPIO 96 | 217 | #define N8X0_SLOT_SWITCH_GPIO 96 | 
| 218 | #define N810_EMMC_VSD_GPIO 23 | 218 | #define N810_EMMC_VSD_GPIO 23 | 
| 219 | #define NN810_EMMC_VIO_GPIO 9 | 219 | #define N810_EMMC_VIO_GPIO 9 | 
| 220 | 220 | ||
| 221 | static int n8x0_mmc_switch_slot(struct device *dev, int slot) | 221 | static int n8x0_mmc_switch_slot(struct device *dev, int slot) | 
| 222 | { | 222 | { | 
| @@ -304,10 +304,10 @@ static void n810_set_power_emmc(struct device *dev, | |||
| 304 | if (power_on) { | 304 | if (power_on) { | 
| 305 | gpio_set_value(N810_EMMC_VSD_GPIO, 1); | 305 | gpio_set_value(N810_EMMC_VSD_GPIO, 1); | 
| 306 | msleep(1); | 306 | msleep(1); | 
| 307 | gpio_set_value(NN810_EMMC_VIO_GPIO, 1); | 307 | gpio_set_value(N810_EMMC_VIO_GPIO, 1); | 
| 308 | msleep(1); | 308 | msleep(1); | 
| 309 | } else { | 309 | } else { | 
| 310 | gpio_set_value(NN810_EMMC_VIO_GPIO, 0); | 310 | gpio_set_value(N810_EMMC_VIO_GPIO, 0); | 
| 311 | msleep(50); | 311 | msleep(50); | 
| 312 | gpio_set_value(N810_EMMC_VSD_GPIO, 0); | 312 | gpio_set_value(N810_EMMC_VSD_GPIO, 0); | 
| 313 | msleep(50); | 313 | msleep(50); | 
| @@ -468,7 +468,7 @@ static void n8x0_mmc_cleanup(struct device *dev) | |||
| 468 | 468 | ||
| 469 | if (machine_is_nokia_n810()) { | 469 | if (machine_is_nokia_n810()) { | 
| 470 | gpio_free(N810_EMMC_VSD_GPIO); | 470 | gpio_free(N810_EMMC_VSD_GPIO); | 
| 471 | gpio_free(NN810_EMMC_VIO_GPIO); | 471 | gpio_free(N810_EMMC_VIO_GPIO); | 
| 472 | } | 472 | } | 
| 473 | } | 473 | } | 
| 474 | 474 | ||
| @@ -529,7 +529,7 @@ void __init n8x0_mmc_init(void) | |||
| 529 | 529 | ||
| 530 | err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); | 530 | err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); | 
| 531 | if (err) | 531 | if (err) | 
| 532 | return err; | 532 | return; | 
| 533 | 533 | ||
| 534 | gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); | 534 | gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); | 
| 535 | 535 | ||
| @@ -537,17 +537,17 @@ void __init n8x0_mmc_init(void) | |||
| 537 | err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); | 537 | err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); | 
| 538 | if (err) { | 538 | if (err) { | 
| 539 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 539 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 
| 540 | return err; | 540 | return; | 
| 541 | } | 541 | } | 
| 542 | gpio_direction_output(N810_EMMC_VSD_GPIO, 0); | 542 | gpio_direction_output(N810_EMMC_VSD_GPIO, 0); | 
| 543 | 543 | ||
| 544 | err = gpio_request(NN810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); | 544 | err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); | 
| 545 | if (err) { | 545 | if (err) { | 
| 546 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 546 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 
| 547 | gpio_free(N810_EMMC_VSD_GPIO); | 547 | gpio_free(N810_EMMC_VSD_GPIO); | 
| 548 | return err; | 548 | return; | 
| 549 | } | 549 | } | 
| 550 | gpio_direction_output(NN810_EMMC_VIO_GPIO, 0); | 550 | gpio_direction_output(N810_EMMC_VIO_GPIO, 0); | 
| 551 | } | 551 | } | 
| 552 | 552 | ||
| 553 | mmc_data[0] = &mmc1_data; | 553 | mmc_data[0] = &mmc1_data; | 
diff --git a/arch/arm/mach-omap2/board-sdp-flash.c b/arch/arm/mach-omap2/board-sdp-flash.c index b1b88deec7f2..2d026328e385 100644 --- a/arch/arm/mach-omap2/board-sdp-flash.c +++ b/arch/arm/mach-omap2/board-sdp-flash.c  | |||
| @@ -253,20 +253,20 @@ void __init sdp_flash_init(struct flash_partitions sdp_partition_info[]) | |||
| 253 | } | 253 | } | 
| 254 | 254 | ||
| 255 | if (norcs > GPMC_CS_NUM) | 255 | if (norcs > GPMC_CS_NUM) | 
| 256 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 256 | printk(KERN_INFO "NOR: Unable to find configuration " | 
| 257 | " in GPMC\n "); | 257 | "in GPMC\n"); | 
| 258 | else | 258 | else | 
| 259 | board_nor_init(sdp_partition_info[0], norcs); | 259 | board_nor_init(sdp_partition_info[0], norcs); | 
| 260 | 260 | ||
| 261 | if (onenandcs > GPMC_CS_NUM) | 261 | if (onenandcs > GPMC_CS_NUM) | 
| 262 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 262 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 
| 263 | " in GPMC\n "); | 263 | "in GPMC\n"); | 
| 264 | else | 264 | else | 
| 265 | board_onenand_init(sdp_partition_info[1], onenandcs); | 265 | board_onenand_init(sdp_partition_info[1], onenandcs); | 
| 266 | 266 | ||
| 267 | if (nandcs > GPMC_CS_NUM) | 267 | if (nandcs > GPMC_CS_NUM) | 
| 268 | printk(KERN_INFO "NAND: Unable to find configuration " | 268 | printk(KERN_INFO "NAND: Unable to find configuration " | 
| 269 | " in GPMC\n "); | 269 | "in GPMC\n"); | 
| 270 | else | 270 | else | 
| 271 | board_nand_init(sdp_partition_info[2], nandcs); | 271 | board_nand_init(sdp_partition_info[2], nandcs); | 
| 272 | } | 272 | } | 
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index bb4018b60642..e15d2e87cfc1 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c  | |||
| @@ -96,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
| 96 | 96 | ||
| 97 | static struct platform_device zoom_debugboard_serial_device = { | 97 | static struct platform_device zoom_debugboard_serial_device = { | 
| 98 | .name = "serial8250", | 98 | .name = "serial8250", | 
| 99 | .id = 3, | 99 | .id = PLAT8250_DEV_PLATFORM, | 
| 100 | .dev = { | 100 | .dev = { | 
| 101 | .platform_data = serial_platform_data, | 101 | .platform_data = serial_platform_data, | 
| 102 | }, | 102 | }, | 
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index ca95d8d64136..6b3984964cc5 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c  | |||
| @@ -280,7 +280,6 @@ static void enable_board_wakeup_source(void) | |||
| 280 | void __init zoom_peripherals_init(void) | 280 | void __init zoom_peripherals_init(void) | 
| 281 | { | 281 | { | 
| 282 | omap_i2c_init(); | 282 | omap_i2c_init(); | 
| 283 | omap_serial_init(); | ||
| 284 | usb_musb_init(&musb_board_data); | 283 | usb_musb_init(&musb_board_data); | 
| 285 | enable_board_wakeup_source(); | 284 | enable_board_wakeup_source(); | 
| 286 | } | 285 | } | 
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index d5153b6bd6cb..9cba5560519b 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c  | |||
| @@ -895,7 +895,7 @@ static struct clk dpll4_m4x2_ck = { | |||
| 895 | .ops = &clkops_omap2_dflt_wait, | 895 | .ops = &clkops_omap2_dflt_wait, | 
| 896 | .parent = &dpll4_m4_ck, | 896 | .parent = &dpll4_m4_ck, | 
| 897 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 897 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 
| 898 | .enable_bit = OMAP3430_PWRDN_CAM_SHIFT, | 898 | .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT, | 
| 899 | .flags = INVERT_ENABLE, | 899 | .flags = INVERT_ENABLE, | 
| 900 | .clkdm_name = "dpll4_clkdm", | 900 | .clkdm_name = "dpll4_clkdm", | 
| 901 | .recalc = &omap3_clkoutx2_recalc, | 901 | .recalc = &omap3_clkoutx2_recalc, | 
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 28b107967c86..a5c0c9c8e496 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c  | |||
| @@ -2671,10 +2671,10 @@ static struct omap_clk omap44xx_clks[] = { | |||
| 2671 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), | 2671 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), | 
| 2672 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), | 2672 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), | 
| 2673 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), | 2673 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), | 
| 2674 | CLK("omap-mcspi.1", "ick", &dummy_ck, CK_443X), | 2674 | CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X), | 
| 2675 | CLK("omap-mcspi.2", "ick", &dummy_ck, CK_443X), | 2675 | CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X), | 
| 2676 | CLK("omap-mcspi.3", "ick", &dummy_ck, CK_443X), | 2676 | CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X), | 
| 2677 | CLK("omap-mcspi.4", "ick", &dummy_ck, CK_443X), | 2677 | CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X), | 
| 2678 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), | 2678 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), | 
| 2679 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 2679 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 
| 2680 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 2680 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b87ad66f083e..6e568ec995ee 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c  | |||
| @@ -240,7 +240,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable) | |||
| 240 | bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; | 240 | bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; | 
| 241 | else | 241 | else | 
| 242 | bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; | 242 | bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; | 
| 243 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 243 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { | 
| 244 | if (enable) | 244 | if (enable) | 
| 245 | bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; | 245 | bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; | 
| 246 | else | 246 | else | 
| @@ -812,7 +812,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) | |||
| 812 | cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, | 812 | cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, | 
| 813 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 813 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 
| 814 | 814 | ||
| 815 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 815 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { | 
| 816 | 816 | ||
| 817 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << | 817 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << | 
| 818 | __ffs(clkdm->clktrctrl_mask)); | 818 | __ffs(clkdm->clktrctrl_mask)); | 
| @@ -856,7 +856,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) | |||
| 856 | cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, | 856 | cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, | 
| 857 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 857 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 
| 858 | 858 | ||
| 859 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 859 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { | 
| 860 | 860 | ||
| 861 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << | 861 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << | 
| 862 | __ffs(clkdm->clktrctrl_mask)); | 862 | __ffs(clkdm->clktrctrl_mask)); | 
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 23e4d7733610..2271b9bd1f50 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c  | |||
| @@ -726,7 +726,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
| 726 | if (!cpu_is_omap44xx()) | 726 | if (!cpu_is_omap44xx()) | 
| 727 | return; | 727 | return; | 
| 728 | base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; | 728 | base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; | 
| 729 | irq = OMAP44XX_IRQ_MMC4; | 729 | irq = OMAP44XX_IRQ_MMC5; | 
| 730 | break; | 730 | break; | 
| 731 | default: | 731 | default: | 
| 732 | continue; | 732 | continue; | 
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 64d74f05abbe..e57fb29ff855 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c  | |||
| @@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void) | |||
| 39 | struct gpmc_timings t; | 39 | struct gpmc_timings t; | 
| 40 | int err; | 40 | int err; | 
| 41 | 41 | ||
| 42 | if (!gpmc_nand_data->gpmc_t) | ||
| 43 | return 0; | ||
| 44 | |||
| 42 | memset(&t, 0, sizeof(t)); | 45 | memset(&t, 0, sizeof(t)); | 
| 43 | t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk); | 46 | t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk); | 
| 44 | t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); | 47 | t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); | 
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index ff25c7e4e606..50fd74916643 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S  | |||
| @@ -52,7 +52,7 @@ omap_irq_base: .word 0 | |||
| 52 | 52 | ||
| 53 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 53 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 
| 54 | and \tmp, \tmp, #0x000f0000 @ only check architecture | 54 | and \tmp, \tmp, #0x000f0000 @ only check architecture | 
| 55 | cmp \tmp, #0x00060000 @ is v6? | 55 | cmp \tmp, #0x00070000 @ is v6? | 
| 56 | beq 2400f @ found v6 so it's omap24xx | 56 | beq 2400f @ found v6 so it's omap24xx | 
| 57 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 57 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 
| 58 | and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9 | 58 | and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9 | 
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S index aa3f65c2ac97..ef0e7a00dd6c 100644 --- a/arch/arm/mach-omap2/omap-headsmp.S +++ b/arch/arm/mach-omap2/omap-headsmp.S  | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ENTRY(omap_secondary_startup) | 33 | ENTRY(omap_secondary_startup) | 
| 34 | hold: ldr r12,=0x103 | 34 | hold: ldr r12,=0x103 | 
| 35 | dsb | 35 | dsb | 
| 36 | smc @ read from AuxCoreBoot0 | 36 | smc #0 @ read from AuxCoreBoot0 | 
| 37 | mov r0, r0, lsr #9 | 37 | mov r0, r0, lsr #9 | 
| 38 | mrc p15, 0, r4, c0, c0, 5 | 38 | mrc p15, 0, r4, c0, c0, 5 | 
| 39 | and r4, r4, #0x0f | 39 | and r4, r4, #0x0f | 
| @@ -52,7 +52,7 @@ ENTRY(omap_modify_auxcoreboot0) | |||
| 52 | stmfd sp!, {r1-r12, lr} | 52 | stmfd sp!, {r1-r12, lr} | 
| 53 | ldr r12, =0x104 | 53 | ldr r12, =0x104 | 
| 54 | dsb | 54 | dsb | 
| 55 | smc | 55 | smc #0 | 
| 56 | ldmfd sp!, {r1-r12, pc} | 56 | ldmfd sp!, {r1-r12, pc} | 
| 57 | END(omap_modify_auxcoreboot0) | 57 | END(omap_modify_auxcoreboot0) | 
| 58 | 58 | ||
| @@ -60,6 +60,6 @@ ENTRY(omap_auxcoreboot_addr) | |||
| 60 | stmfd sp!, {r2-r12, lr} | 60 | stmfd sp!, {r2-r12, lr} | 
| 61 | ldr r12, =0x105 | 61 | ldr r12, =0x105 | 
| 62 | dsb | 62 | dsb | 
| 63 | smc | 63 | smc #0 | 
| 64 | ldmfd sp!, {r2-r12, pc} | 64 | ldmfd sp!, {r2-r12, pc} | 
| 65 | END(omap_auxcoreboot_addr) | 65 | END(omap_auxcoreboot_addr) | 
diff --git a/arch/arm/mach-omap2/omap44xx-smc.S b/arch/arm/mach-omap2/omap44xx-smc.S index 89bb2b141473..f61c7771ca47 100644 --- a/arch/arm/mach-omap2/omap44xx-smc.S +++ b/arch/arm/mach-omap2/omap44xx-smc.S  | |||
| @@ -27,6 +27,6 @@ ENTRY(omap_smc1) | |||
| 27 | mov r12, r0 | 27 | mov r12, r0 | 
| 28 | mov r0, r1 | 28 | mov r0, r1 | 
| 29 | dsb | 29 | dsb | 
| 30 | smc | 30 | smc #0 | 
| 31 | ldmfd sp!, {r2-r12, pc} | 31 | ldmfd sp!, {r2-r12, pc} | 
| 32 | END(omap_smc1) | 32 | END(omap_smc1) | 
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index c6649472ce0d..e436dcb19795 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c  | |||
| @@ -1511,6 +1511,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) | |||
| 1511 | c = oh->slaves[oh->_mpu_port_index]->_clk; | 1511 | c = oh->slaves[oh->_mpu_port_index]->_clk; | 
| 1512 | } | 1512 | } | 
| 1513 | 1513 | ||
| 1514 | if (!c->clkdm) | ||
| 1515 | return NULL; | ||
| 1516 | |||
| 1514 | return c->clkdm->pwrdm.ptr; | 1517 | return c->clkdm->pwrdm.ptr; | 
| 1515 | 1518 | ||
| 1516 | } | 1519 | } | 
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9a0fb385622b..ebfce7d1a5d3 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c  | |||
| @@ -222,7 +222,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list) | |||
| 222 | { | 222 | { | 
| 223 | struct powerdomain **p = NULL; | 223 | struct powerdomain **p = NULL; | 
| 224 | 224 | ||
| 225 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) { | 225 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | 
| 226 | pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; | 226 | pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; | 
| 227 | pwrstst_reg_offs = OMAP2_PM_PWSTST; | 227 | pwrstst_reg_offs = OMAP2_PM_PWSTST; | 
| 228 | } else if (cpu_is_omap44xx()) { | 228 | } else if (cpu_is_omap44xx()) { | 
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 9537f6f2352d..07a60f1204ca 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c  | |||
| @@ -123,7 +123,7 @@ struct omap3_prcm_regs prcm_context; | |||
| 123 | u32 omap_prcm_get_reset_sources(void) | 123 | u32 omap_prcm_get_reset_sources(void) | 
| 124 | { | 124 | { | 
| 125 | /* XXX This presumably needs modification for 34XX */ | 125 | /* XXX This presumably needs modification for 34XX */ | 
| 126 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) | 126 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 
| 127 | return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; | 127 | return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; | 
| 128 | if (cpu_is_omap44xx()) | 128 | if (cpu_is_omap44xx()) | 
| 129 | return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; | 129 | return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; | 
| @@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode, const char *cmd) | |||
| 157 | else | 157 | else | 
| 158 | WARN_ON(1); | 158 | WARN_ON(1); | 
| 159 | 159 | ||
| 160 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) | 160 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 
| 161 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, | 161 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, | 
| 162 | OMAP2_RM_RSTCTRL); | 162 | OMAP2_RM_RSTCTRL); | 
| 163 | if (cpu_is_omap44xx()) | 163 | if (cpu_is_omap44xx()) | 
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index da77930480e9..3771254dfa81 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c  | |||
| @@ -115,7 +115,6 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
| 115 | } | 115 | } | 
| 116 | }; | 116 | }; | 
| 117 | 117 | ||
| 118 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
| 119 | static struct plat_serial8250_port serial_platform_data3[] = { | 118 | static struct plat_serial8250_port serial_platform_data3[] = { | 
| 120 | { | 119 | { | 
| 121 | .irq = 70, | 120 | .irq = 70, | 
| @@ -128,23 +127,12 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
| 128 | } | 127 | } | 
| 129 | }; | 128 | }; | 
| 130 | 129 | ||
| 131 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
| 132 | { | ||
| 133 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | ||
| 134 | } | ||
| 135 | #else | ||
| 136 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
| 137 | { | ||
| 138 | } | ||
| 139 | #endif | ||
| 140 | |||
| 141 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | 130 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | 
| 142 | { | 131 | { | 
| 143 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | 132 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | 
| 144 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | 133 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | 
| 145 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | 134 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | 
| 146 | if (cpu_is_omap3630() || cpu_is_omap44xx()) | 135 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | 
| 147 | omap2_set_globals_uart4(omap2_globals); | ||
| 148 | } | 136 | } | 
| 149 | 137 | ||
| 150 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 138 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 
| @@ -550,7 +538,7 @@ static ssize_t sleep_timeout_store(struct device *dev, | |||
| 550 | unsigned int value; | 538 | unsigned int value; | 
| 551 | 539 | ||
| 552 | if (sscanf(buf, "%u", &value) != 1) { | 540 | if (sscanf(buf, "%u", &value) != 1) { | 
| 553 | printk(KERN_ERR "sleep_timeout_store: Invalid value\n"); | 541 | dev_err(dev, "sleep_timeout_store: Invalid value\n"); | 
| 554 | return -EINVAL; | 542 | return -EINVAL; | 
| 555 | } | 543 | } | 
| 556 | 544 | ||
| @@ -664,27 +652,33 @@ void __init omap_serial_early_init(void) | |||
| 664 | struct device *dev = &pdev->dev; | 652 | struct device *dev = &pdev->dev; | 
| 665 | struct plat_serial8250_port *p = dev->platform_data; | 653 | struct plat_serial8250_port *p = dev->platform_data; | 
| 666 | 654 | ||
| 655 | /* Don't map zero-based physical address */ | ||
| 656 | if (p->mapbase == 0) { | ||
| 657 | dev_warn(dev, "no physical address for uart#%d," | ||
| 658 | " so skipping early_init...\n", i); | ||
| 659 | continue; | ||
| 660 | } | ||
| 667 | /* | 661 | /* | 
| 668 | * Module 4KB + L4 interconnect 4KB | 662 | * Module 4KB + L4 interconnect 4KB | 
| 669 | * Static mapping, never released | 663 | * Static mapping, never released | 
| 670 | */ | 664 | */ | 
| 671 | p->membase = ioremap(p->mapbase, SZ_8K); | 665 | p->membase = ioremap(p->mapbase, SZ_8K); | 
| 672 | if (!p->membase) { | 666 | if (!p->membase) { | 
| 673 | printk(KERN_ERR "ioremap failed for uart%i\n", i + 1); | 667 | dev_err(dev, "ioremap failed for uart%i\n", i + 1); | 
| 674 | continue; | 668 | continue; | 
| 675 | } | 669 | } | 
| 676 | 670 | ||
| 677 | sprintf(name, "uart%d_ick", i + 1); | 671 | sprintf(name, "uart%d_ick", i + 1); | 
| 678 | uart->ick = clk_get(NULL, name); | 672 | uart->ick = clk_get(NULL, name); | 
| 679 | if (IS_ERR(uart->ick)) { | 673 | if (IS_ERR(uart->ick)) { | 
| 680 | printk(KERN_ERR "Could not get uart%d_ick\n", i + 1); | 674 | dev_err(dev, "Could not get uart%d_ick\n", i + 1); | 
| 681 | uart->ick = NULL; | 675 | uart->ick = NULL; | 
| 682 | } | 676 | } | 
| 683 | 677 | ||
| 684 | sprintf(name, "uart%d_fck", i+1); | 678 | sprintf(name, "uart%d_fck", i+1); | 
| 685 | uart->fck = clk_get(NULL, name); | 679 | uart->fck = clk_get(NULL, name); | 
| 686 | if (IS_ERR(uart->fck)) { | 680 | if (IS_ERR(uart->fck)) { | 
| 687 | printk(KERN_ERR "Could not get uart%d_fck\n", i + 1); | 681 | dev_err(dev, "Could not get uart%d_fck\n", i + 1); | 
| 688 | uart->fck = NULL; | 682 | uart->fck = NULL; | 
| 689 | } | 683 | } | 
| 690 | 684 | ||
| @@ -727,6 +721,13 @@ void __init omap_serial_init_port(int port) | |||
| 727 | pdev = &uart->pdev; | 721 | pdev = &uart->pdev; | 
| 728 | dev = &pdev->dev; | 722 | dev = &pdev->dev; | 
| 729 | 723 | ||
| 724 | /* Don't proceed if there's no clocks available */ | ||
| 725 | if (unlikely(!uart->ick || !uart->fck)) { | ||
| 726 | WARN(1, "%s: can't init uart%d, no clocks available\n", | ||
| 727 | kobject_name(&dev->kobj), port); | ||
| 728 | return; | ||
| 729 | } | ||
| 730 | |||
| 730 | omap_uart_enable_clocks(uart); | 731 | omap_uart_enable_clocks(uart); | 
| 731 | 732 | ||
| 732 | omap_uart_reset(uart); | 733 | omap_uart_reset(uart); | 
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 088c1a03b946..f12f0e39ddf2 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c  | |||
| @@ -44,9 +44,6 @@ | |||
| 44 | 44 | ||
| 45 | #define NO_LENGTH_CHECK 0xffffffff | 45 | #define NO_LENGTH_CHECK 0xffffffff | 
| 46 | 46 | ||
| 47 | unsigned char omap_bootloader_tag[512]; | ||
| 48 | int omap_bootloader_tag_len; | ||
| 49 | |||
| 50 | struct omap_board_config_kernel *omap_board_config; | 47 | struct omap_board_config_kernel *omap_board_config; | 
| 51 | int omap_board_config_size; | 48 | int omap_board_config_size; | 
| 52 | 49 | ||
| @@ -100,10 +97,17 @@ EXPORT_SYMBOL(omap_get_var_config); | |||
| 100 | 97 | ||
| 101 | #include <linux/clocksource.h> | 98 | #include <linux/clocksource.h> | 
| 102 | 99 | ||
| 100 | /* | ||
| 101 | * offset_32k holds the init time counter value. It is then subtracted | ||
| 102 | * from every counter read to achieve a counter that counts time from the | ||
| 103 | * kernel boot (needed for sched_clock()). | ||
| 104 | */ | ||
| 105 | static u32 offset_32k __read_mostly; | ||
| 106 | |||
| 103 | #ifdef CONFIG_ARCH_OMAP16XX | 107 | #ifdef CONFIG_ARCH_OMAP16XX | 
| 104 | static cycle_t omap16xx_32k_read(struct clocksource *cs) | 108 | static cycle_t omap16xx_32k_read(struct clocksource *cs) | 
| 105 | { | 109 | { | 
| 106 | return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED); | 110 | return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k; | 
| 107 | } | 111 | } | 
| 108 | #else | 112 | #else | 
| 109 | #define omap16xx_32k_read NULL | 113 | #define omap16xx_32k_read NULL | 
| @@ -112,7 +116,7 @@ static cycle_t omap16xx_32k_read(struct clocksource *cs) | |||
| 112 | #ifdef CONFIG_ARCH_OMAP2420 | 116 | #ifdef CONFIG_ARCH_OMAP2420 | 
| 113 | static cycle_t omap2420_32k_read(struct clocksource *cs) | 117 | static cycle_t omap2420_32k_read(struct clocksource *cs) | 
| 114 | { | 118 | { | 
| 115 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10); | 119 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; | 
| 116 | } | 120 | } | 
| 117 | #else | 121 | #else | 
| 118 | #define omap2420_32k_read NULL | 122 | #define omap2420_32k_read NULL | 
| @@ -121,7 +125,7 @@ static cycle_t omap2420_32k_read(struct clocksource *cs) | |||
| 121 | #ifdef CONFIG_ARCH_OMAP2430 | 125 | #ifdef CONFIG_ARCH_OMAP2430 | 
| 122 | static cycle_t omap2430_32k_read(struct clocksource *cs) | 126 | static cycle_t omap2430_32k_read(struct clocksource *cs) | 
| 123 | { | 127 | { | 
| 124 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10); | 128 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; | 
| 125 | } | 129 | } | 
| 126 | #else | 130 | #else | 
| 127 | #define omap2430_32k_read NULL | 131 | #define omap2430_32k_read NULL | 
| @@ -130,7 +134,7 @@ static cycle_t omap2430_32k_read(struct clocksource *cs) | |||
| 130 | #ifdef CONFIG_ARCH_OMAP3 | 134 | #ifdef CONFIG_ARCH_OMAP3 | 
| 131 | static cycle_t omap34xx_32k_read(struct clocksource *cs) | 135 | static cycle_t omap34xx_32k_read(struct clocksource *cs) | 
| 132 | { | 136 | { | 
| 133 | return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10); | 137 | return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k; | 
| 134 | } | 138 | } | 
| 135 | #else | 139 | #else | 
| 136 | #define omap34xx_32k_read NULL | 140 | #define omap34xx_32k_read NULL | 
| @@ -139,7 +143,7 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs) | |||
| 139 | #ifdef CONFIG_ARCH_OMAP4 | 143 | #ifdef CONFIG_ARCH_OMAP4 | 
| 140 | static cycle_t omap44xx_32k_read(struct clocksource *cs) | 144 | static cycle_t omap44xx_32k_read(struct clocksource *cs) | 
| 141 | { | 145 | { | 
| 142 | return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10); | 146 | return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k; | 
| 143 | } | 147 | } | 
| 144 | #else | 148 | #else | 
| 145 | #define omap44xx_32k_read NULL | 149 | #define omap44xx_32k_read NULL | 
| @@ -227,6 +231,8 @@ static int __init omap_init_clocksource_32k(void) | |||
| 227 | clocksource_32k.mult = clocksource_hz2mult(32768, | 231 | clocksource_32k.mult = clocksource_hz2mult(32768, | 
| 228 | clocksource_32k.shift); | 232 | clocksource_32k.shift); | 
| 229 | 233 | ||
| 234 | offset_32k = clocksource_32k.read(&clocksource_32k); | ||
| 235 | |||
| 230 | if (clocksource_register(&clocksource_32k)) | 236 | if (clocksource_register(&clocksource_32k)) | 
| 231 | printk(err, clocksource_32k.name); | 237 | printk(err, clocksource_32k.name); | 
| 232 | } | 238 | } | 
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 5c6c342c53f5..1d959965ff52 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c  | |||
| @@ -937,6 +937,15 @@ void omap_start_dma(int lch) | |||
| 937 | { | 937 | { | 
| 938 | u32 l; | 938 | u32 l; | 
| 939 | 939 | ||
| 940 | /* | ||
| 941 | * The CPC/CDAC register needs to be initialized to zero | ||
| 942 | * before starting dma transfer. | ||
| 943 | */ | ||
| 944 | if (cpu_is_omap15xx()) | ||
| 945 | dma_write(0, CPC(lch)); | ||
| 946 | else | ||
| 947 | dma_write(0, CDAC(lch)); | ||
| 948 | |||
| 940 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 949 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 
| 941 | int next_lch, cur_lch; | 950 | int next_lch, cur_lch; | 
| 942 | char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT]; | 951 | char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT]; | 
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 76a347b3ce07..45a225d09125 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c  | |||
| @@ -798,7 +798,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 798 | case METHOD_MPUIO: | 798 | case METHOD_MPUIO: | 
| 799 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 799 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 
| 800 | l = __raw_readl(reg); | 800 | l = __raw_readl(reg); | 
| 801 | if (trigger & IRQ_TYPE_EDGE_BOTH) | 801 | if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | 
| 802 | bank->toggle_mask |= 1 << gpio; | 802 | bank->toggle_mask |= 1 << gpio; | 
| 803 | if (trigger & IRQ_TYPE_EDGE_RISING) | 803 | if (trigger & IRQ_TYPE_EDGE_RISING) | 
| 804 | l |= 1 << gpio; | 804 | l |= 1 << gpio; | 
| @@ -812,7 +812,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 812 | case METHOD_GPIO_1510: | 812 | case METHOD_GPIO_1510: | 
| 813 | reg += OMAP1510_GPIO_INT_CONTROL; | 813 | reg += OMAP1510_GPIO_INT_CONTROL; | 
| 814 | l = __raw_readl(reg); | 814 | l = __raw_readl(reg); | 
| 815 | if (trigger & IRQ_TYPE_EDGE_BOTH) | 815 | if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | 
| 816 | bank->toggle_mask |= 1 << gpio; | 816 | bank->toggle_mask |= 1 << gpio; | 
| 817 | if (trigger & IRQ_TYPE_EDGE_RISING) | 817 | if (trigger & IRQ_TYPE_EDGE_RISING) | 
| 818 | l |= 1 << gpio; | 818 | l |= 1 << gpio; | 
| @@ -846,7 +846,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
| 846 | case METHOD_GPIO_7XX: | 846 | case METHOD_GPIO_7XX: | 
| 847 | reg += OMAP7XX_GPIO_INT_CONTROL; | 847 | reg += OMAP7XX_GPIO_INT_CONTROL; | 
| 848 | l = __raw_readl(reg); | 848 | l = __raw_readl(reg); | 
| 849 | if (trigger & IRQ_TYPE_EDGE_BOTH) | 849 | if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | 
| 850 | bank->toggle_mask |= 1 << gpio; | 850 | bank->toggle_mask |= 1 << gpio; | 
| 851 | if (trigger & IRQ_TYPE_EDGE_RISING) | 851 | if (trigger & IRQ_TYPE_EDGE_RISING) | 
| 852 | l |= 1 << gpio; | 852 | l |= 1 << gpio; | 
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index b65088a869e9..401701977dbb 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h  | |||
| @@ -345,8 +345,6 @@ | |||
| 345 | #define INT_34XX_MMC3_IRQ 94 | 345 | #define INT_34XX_MMC3_IRQ 94 | 
| 346 | #define INT_34XX_GPT12_IRQ 95 | 346 | #define INT_34XX_GPT12_IRQ 95 | 
| 347 | 347 | ||
| 348 | #define INT_34XX_BENCH_MPU_EMUL 3 | ||
| 349 | |||
| 350 | #define INT_35XX_HECC0_IRQ 24 | 348 | #define INT_35XX_HECC0_IRQ 24 | 
| 351 | #define INT_35XX_HECC1_IRQ 28 | 349 | #define INT_35XX_HECC1_IRQ 28 | 
| 352 | #define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 | 350 | #define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 | 
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 39748354ce45..7de903d7c1ce 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h  | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | #define OMAP44XX_MCBSP1_BASE 0x49022000 | 59 | #define OMAP44XX_MCBSP1_BASE 0x49022000 | 
| 60 | #define OMAP44XX_MCBSP2_BASE 0x49024000 | 60 | #define OMAP44XX_MCBSP2_BASE 0x49024000 | 
| 61 | #define OMAP44XX_MCBSP3_BASE 0x49026000 | 61 | #define OMAP44XX_MCBSP3_BASE 0x49026000 | 
| 62 | #define OMAP44XX_MCBSP4_BASE 0x48074000 | 62 | #define OMAP44XX_MCBSP4_BASE 0x48096000 | 
| 63 | 63 | ||
| 64 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 64 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 
| 65 | 65 | ||
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h index 6ba88d2630d9..f8efd5466b1d 100644 --- a/arch/arm/plat-omap/include/plat/nand.h +++ b/arch/arm/plat-omap/include/plat/nand.h  | |||
| @@ -29,4 +29,11 @@ struct omap_nand_platform_data { | |||
| 29 | /* size (4 KiB) for IO mapping */ | 29 | /* size (4 KiB) for IO mapping */ | 
| 30 | #define NAND_IO_SIZE SZ_4K | 30 | #define NAND_IO_SIZE SZ_4K | 
| 31 | 31 | ||
| 32 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
| 32 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | 33 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | 
| 34 | #else | ||
| 35 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d) | ||
| 36 | { | ||
| 37 | return 0; | ||
| 38 | } | ||
| 39 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index 2302474a3748..b3ef1a7f53cc 100644 --- a/arch/arm/plat-omap/include/plat/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h  | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #define OMAP4430_PRM_BASE 0x4a306000 | 32 | #define OMAP4430_PRM_BASE 0x4a306000 | 
| 33 | #define OMAP44XX_GPMC_BASE 0x50000000 | 33 | #define OMAP44XX_GPMC_BASE 0x50000000 | 
| 34 | #define OMAP443X_SCM_BASE 0x4a002000 | 34 | #define OMAP443X_SCM_BASE 0x4a002000 | 
| 35 | #define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE | 35 | #define OMAP443X_CTRL_BASE 0x4a100000 | 
| 36 | #define OMAP44XX_IC_BASE 0x48200000 | 36 | #define OMAP44XX_IC_BASE 0x48200000 | 
| 37 | #define OMAP44XX_IVA_INTC_BASE 0x40000000 | 37 | #define OMAP44XX_IVA_INTC_BASE 0x40000000 | 
| 38 | #define IRQ_SIR_IRQ 0x0040 | 38 | #define IRQ_SIR_IRQ 0x0040 | 
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 440b4164f2f6..36d6ea56ab51 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h  | |||
| @@ -294,8 +294,8 @@ struct omap_hwmod_class_sysconfig { | |||
| 294 | u16 rev_offs; | 294 | u16 rev_offs; | 
| 295 | u16 sysc_offs; | 295 | u16 sysc_offs; | 
| 296 | u16 syss_offs; | 296 | u16 syss_offs; | 
| 297 | u16 sysc_flags; | ||
| 297 | u8 idlemodes; | 298 | u8 idlemodes; | 
| 298 | u8 sysc_flags; | ||
| 299 | u8 clockact; | 299 | u8 clockact; | 
| 300 | struct omap_hwmod_sysc_fields *sysc_fields; | 300 | struct omap_hwmod_sysc_fields *sysc_fields; | 
| 301 | }; | 301 | }; | 
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index dd5b882aab40..5e73c25f8f85 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c  | |||
| @@ -28,7 +28,7 @@ static struct pt_regs *get_user_regs(struct task_struct *tsk) | |||
| 28 | THREAD_SIZE - sizeof(struct pt_regs)); | 28 | THREAD_SIZE - sizeof(struct pt_regs)); | 
| 29 | } | 29 | } | 
| 30 | 30 | ||
| 31 | static void user_enable_single_step(struct task_struct *tsk) | 31 | void user_enable_single_step(struct task_struct *tsk) | 
| 32 | { | 32 | { | 
| 33 | pr_debug("user_enable_single_step: pid=%u, PC=0x%08lx, SR=0x%08lx\n", | 33 | pr_debug("user_enable_single_step: pid=%u, PC=0x%08lx, SR=0x%08lx\n", | 
| 34 | tsk->pid, task_pt_regs(tsk)->pc, task_pt_regs(tsk)->sr); | 34 | tsk->pid, task_pt_regs(tsk)->pc, task_pt_regs(tsk)->sr); | 
diff --git a/crypto/authenc.c b/crypto/authenc.c index 2bb7348d8d55..05eb32e0d949 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c  | |||
| @@ -46,6 +46,12 @@ struct authenc_request_ctx { | |||
| 46 | char tail[]; | 46 | char tail[]; | 
| 47 | }; | 47 | }; | 
| 48 | 48 | ||
| 49 | static void authenc_request_complete(struct aead_request *req, int err) | ||
| 50 | { | ||
| 51 | if (err != -EINPROGRESS) | ||
| 52 | aead_request_complete(req, err); | ||
| 53 | } | ||
| 54 | |||
| 49 | static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key, | 55 | static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key, | 
| 50 | unsigned int keylen) | 56 | unsigned int keylen) | 
| 51 | { | 57 | { | 
| @@ -142,7 +148,7 @@ static void authenc_geniv_ahash_update_done(struct crypto_async_request *areq, | |||
| 142 | crypto_aead_authsize(authenc), 1); | 148 | crypto_aead_authsize(authenc), 1); | 
| 143 | 149 | ||
| 144 | out: | 150 | out: | 
| 145 | aead_request_complete(req, err); | 151 | authenc_request_complete(req, err); | 
| 146 | } | 152 | } | 
| 147 | 153 | ||
| 148 | static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err) | 154 | static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err) | 
| @@ -208,7 +214,7 @@ static void authenc_verify_ahash_update_done(struct crypto_async_request *areq, | |||
| 208 | err = crypto_ablkcipher_decrypt(abreq); | 214 | err = crypto_ablkcipher_decrypt(abreq); | 
| 209 | 215 | ||
| 210 | out: | 216 | out: | 
| 211 | aead_request_complete(req, err); | 217 | authenc_request_complete(req, err); | 
| 212 | } | 218 | } | 
| 213 | 219 | ||
| 214 | static void authenc_verify_ahash_done(struct crypto_async_request *areq, | 220 | static void authenc_verify_ahash_done(struct crypto_async_request *areq, | 
| @@ -245,7 +251,7 @@ static void authenc_verify_ahash_done(struct crypto_async_request *areq, | |||
| 245 | err = crypto_ablkcipher_decrypt(abreq); | 251 | err = crypto_ablkcipher_decrypt(abreq); | 
| 246 | 252 | ||
| 247 | out: | 253 | out: | 
| 248 | aead_request_complete(req, err); | 254 | authenc_request_complete(req, err); | 
| 249 | } | 255 | } | 
| 250 | 256 | ||
| 251 | static u8 *crypto_authenc_ahash_fb(struct aead_request *req, unsigned int flags) | 257 | static u8 *crypto_authenc_ahash_fb(struct aead_request *req, unsigned int flags) | 
| @@ -379,7 +385,7 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req, | |||
| 379 | err = crypto_authenc_genicv(areq, iv, 0); | 385 | err = crypto_authenc_genicv(areq, iv, 0); | 
| 380 | } | 386 | } | 
| 381 | 387 | ||
| 382 | aead_request_complete(areq, err); | 388 | authenc_request_complete(areq, err); | 
| 383 | } | 389 | } | 
| 384 | 390 | ||
| 385 | static int crypto_authenc_encrypt(struct aead_request *req) | 391 | static int crypto_authenc_encrypt(struct aead_request *req) | 
| @@ -420,7 +426,7 @@ static void crypto_authenc_givencrypt_done(struct crypto_async_request *req, | |||
| 420 | err = crypto_authenc_genicv(areq, greq->giv, 0); | 426 | err = crypto_authenc_genicv(areq, greq->giv, 0); | 
| 421 | } | 427 | } | 
| 422 | 428 | ||
| 423 | aead_request_complete(areq, err); | 429 | authenc_request_complete(areq, err); | 
| 424 | } | 430 | } | 
| 425 | 431 | ||
| 426 | static int crypto_authenc_givencrypt(struct aead_givcrypt_request *req) | 432 | static int crypto_authenc_givencrypt(struct aead_givcrypt_request *req) | 
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 7d521e1d17e1..b827c976dc62 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c  | |||
| @@ -252,6 +252,18 @@ static void pca953x_irq_bus_lock(unsigned int irq) | |||
| 252 | static void pca953x_irq_bus_sync_unlock(unsigned int irq) | 252 | static void pca953x_irq_bus_sync_unlock(unsigned int irq) | 
| 253 | { | 253 | { | 
| 254 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 254 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 
| 255 | uint16_t new_irqs; | ||
| 256 | uint16_t level; | ||
| 257 | |||
| 258 | /* Look for any newly setup interrupt */ | ||
| 259 | new_irqs = chip->irq_trig_fall | chip->irq_trig_raise; | ||
| 260 | new_irqs &= ~chip->reg_direction; | ||
| 261 | |||
| 262 | while (new_irqs) { | ||
| 263 | level = __ffs(new_irqs); | ||
| 264 | pca953x_gpio_direction_input(&chip->gpio_chip, level); | ||
| 265 | new_irqs &= ~(1 << level); | ||
| 266 | } | ||
| 255 | 267 | ||
| 256 | mutex_unlock(&chip->irq_lock); | 268 | mutex_unlock(&chip->irq_lock); | 
| 257 | } | 269 | } | 
| @@ -278,7 +290,7 @@ static int pca953x_irq_set_type(unsigned int irq, unsigned int type) | |||
| 278 | else | 290 | else | 
| 279 | chip->irq_trig_raise &= ~mask; | 291 | chip->irq_trig_raise &= ~mask; | 
| 280 | 292 | ||
| 281 | return pca953x_gpio_direction_input(&chip->gpio_chip, level); | 293 | return 0; | 
| 282 | } | 294 | } | 
| 283 | 295 | ||
| 284 | static struct irq_chip pca953x_irq_chip = { | 296 | static struct irq_chip pca953x_irq_chip = { | 
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 3bd872761567..a263b7070fc6 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c  | |||
| @@ -476,6 +476,7 @@ void drm_vblank_off(struct drm_device *dev, int crtc) | |||
| 476 | unsigned long irqflags; | 476 | unsigned long irqflags; | 
| 477 | 477 | ||
| 478 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 478 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 
| 479 | dev->driver->disable_vblank(dev, crtc); | ||
| 479 | DRM_WAKEUP(&dev->vbl_queue[crtc]); | 480 | DRM_WAKEUP(&dev->vbl_queue[crtc]); | 
| 480 | dev->vblank_enabled[crtc] = 0; | 481 | dev->vblank_enabled[crtc] = 0; | 
| 481 | dev->last_vblank[crtc] = dev->driver->get_vblank_counter(dev, crtc); | 482 | dev->last_vblank[crtc] = dev->driver->get_vblank_counter(dev, crtc); | 
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index bd75f99bd65e..eaf1f6bc44f1 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c  | |||
| @@ -324,13 +324,12 @@ void r300_gpu_init(struct radeon_device *rdev) | |||
| 324 | uint32_t gb_tile_config, tmp; | 324 | uint32_t gb_tile_config, tmp; | 
| 325 | 325 | ||
| 326 | r100_hdp_reset(rdev); | 326 | r100_hdp_reset(rdev); | 
| 327 | /* FIXME: rv380 one pipes ? */ | ||
| 328 | if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) || | 327 | if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) || | 
| 329 | (rdev->family == CHIP_R350)) { | 328 | (rdev->family == CHIP_R350 && rdev->pdev->device != 0x4148)) { | 
| 330 | /* r300,r350 */ | 329 | /* r300,r350 */ | 
| 331 | rdev->num_gb_pipes = 2; | 330 | rdev->num_gb_pipes = 2; | 
| 332 | } else { | 331 | } else { | 
| 333 | /* rv350,rv370,rv380,r300 AD */ | 332 | /* rv350,rv370,rv380,r300 AD, r350 AH */ | 
| 334 | rdev->num_gb_pipes = 1; | 333 | rdev->num_gb_pipes = 1; | 
| 335 | } | 334 | } | 
| 336 | rdev->num_z_pipes = 1; | 335 | rdev->num_z_pipes = 1; | 
diff --git a/drivers/gpu/drm/radeon/r300_cmdbuf.c b/drivers/gpu/drm/radeon/r300_cmdbuf.c index ea46d558e8f3..c5c2742e4140 100644 --- a/drivers/gpu/drm/radeon/r300_cmdbuf.c +++ b/drivers/gpu/drm/radeon/r300_cmdbuf.c  | |||
| @@ -921,7 +921,7 @@ static int r300_scratch(drm_radeon_private_t *dev_priv, | |||
| 921 | 921 | ||
| 922 | ptr_addr = drm_buffer_read_object(cmdbuf->buffer, | 922 | ptr_addr = drm_buffer_read_object(cmdbuf->buffer, | 
| 923 | sizeof(stack_ptr_addr), &stack_ptr_addr); | 923 | sizeof(stack_ptr_addr), &stack_ptr_addr); | 
| 924 | ref_age_base = (u32 *)(unsigned long)*ptr_addr; | 924 | ref_age_base = (u32 *)(unsigned long)get_unaligned(ptr_addr); | 
| 925 | 925 | ||
| 926 | for (i=0; i < header.scratch.n_bufs; i++) { | 926 | for (i=0; i < header.scratch.n_bufs; i++) { | 
| 927 | buf_idx = drm_buffer_pointer_to_dword(cmdbuf->buffer, 0); | 927 | buf_idx = drm_buffer_pointer_to_dword(cmdbuf->buffer, 0); | 
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index 3dc968c9f5a4..c2bda4ad62e7 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c  | |||
| @@ -59,6 +59,12 @@ void r420_pipes_init(struct radeon_device *rdev) | |||
| 59 | /* get max number of pipes */ | 59 | /* get max number of pipes */ | 
| 60 | gb_pipe_select = RREG32(0x402C); | 60 | gb_pipe_select = RREG32(0x402C); | 
| 61 | num_pipes = ((gb_pipe_select >> 12) & 3) + 1; | 61 | num_pipes = ((gb_pipe_select >> 12) & 3) + 1; | 
| 62 | |||
| 63 | /* SE chips have 1 pipe */ | ||
| 64 | if ((rdev->pdev->device == 0x5e4c) || | ||
| 65 | (rdev->pdev->device == 0x5e4f)) | ||
| 66 | num_pipes = 1; | ||
| 67 | |||
| 62 | rdev->num_gb_pipes = num_pipes; | 68 | rdev->num_gb_pipes = num_pipes; | 
| 63 | tmp = 0; | 69 | tmp = 0; | 
| 64 | switch (num_pipes) { | 70 | switch (num_pipes) { | 
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 419630dd2075..2f042a3c0e62 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c  | |||
| @@ -435,14 +435,19 @@ static void radeon_init_pipes(struct drm_device *dev) | |||
| 435 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) { | 435 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) { | 
| 436 | gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT); | 436 | gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT); | 
| 437 | dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1; | 437 | dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1; | 
| 438 | /* SE cards have 1 pipe */ | ||
| 439 | if ((dev->pdev->device == 0x5e4c) || | ||
| 440 | (dev->pdev->device == 0x5e4f)) | ||
| 441 | dev_priv->num_gb_pipes = 1; | ||
| 438 | } else { | 442 | } else { | 
| 439 | /* R3xx */ | 443 | /* R3xx */ | 
| 440 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300 && | 444 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300 && | 
| 441 | dev->pdev->device != 0x4144) || | 445 | dev->pdev->device != 0x4144) || | 
| 442 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350)) { | 446 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350 && | 
| 447 | dev->pdev->device != 0x4148)) { | ||
| 443 | dev_priv->num_gb_pipes = 2; | 448 | dev_priv->num_gb_pipes = 2; | 
| 444 | } else { | 449 | } else { | 
| 445 | /* RV3xx/R300 AD */ | 450 | /* RV3xx/R300 AD/R350 AH */ | 
| 446 | dev_priv->num_gb_pipes = 1; | 451 | dev_priv->num_gb_pipes = 1; | 
| 447 | } | 452 | } | 
| 448 | } | 453 | } | 
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index b8d672828246..bb1c122cad21 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c  | |||
| @@ -86,12 +86,12 @@ static void evergreen_crtc_load_lut(struct drm_crtc *crtc) | |||
| 86 | WREG32(EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN + radeon_crtc->crtc_offset, 0xffff); | 86 | WREG32(EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN + radeon_crtc->crtc_offset, 0xffff); | 
| 87 | WREG32(EVERGREEN_DC_LUT_WHITE_OFFSET_RED + radeon_crtc->crtc_offset, 0xffff); | 87 | WREG32(EVERGREEN_DC_LUT_WHITE_OFFSET_RED + radeon_crtc->crtc_offset, 0xffff); | 
| 88 | 88 | ||
| 89 | WREG32(EVERGREEN_DC_LUT_RW_MODE, radeon_crtc->crtc_id); | 89 | WREG32(EVERGREEN_DC_LUT_RW_MODE + radeon_crtc->crtc_offset, 0); | 
| 90 | WREG32(EVERGREEN_DC_LUT_WRITE_EN_MASK, 0x00000007); | 90 | WREG32(EVERGREEN_DC_LUT_WRITE_EN_MASK + radeon_crtc->crtc_offset, 0x00000007); | 
| 91 | 91 | ||
| 92 | WREG32(EVERGREEN_DC_LUT_RW_INDEX, 0); | 92 | WREG32(EVERGREEN_DC_LUT_RW_INDEX + radeon_crtc->crtc_offset, 0); | 
| 93 | for (i = 0; i < 256; i++) { | 93 | for (i = 0; i < 256; i++) { | 
| 94 | WREG32(EVERGREEN_DC_LUT_30_COLOR, | 94 | WREG32(EVERGREEN_DC_LUT_30_COLOR + radeon_crtc->crtc_offset, | 
| 95 | (radeon_crtc->lut_r[i] << 20) | | 95 | (radeon_crtc->lut_r[i] << 20) | | 
| 96 | (radeon_crtc->lut_g[i] << 10) | | 96 | (radeon_crtc->lut_g[i] << 10) | | 
| 97 | (radeon_crtc->lut_b[i] << 0)); | 97 | (radeon_crtc->lut_b[i] << 0)); | 
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 30293bec0801..fed7b8084779 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c  | |||
| @@ -1326,7 +1326,7 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, | |||
| 1326 | 1326 | ||
| 1327 | radeon_encoder->pixel_clock = adjusted_mode->clock; | 1327 | radeon_encoder->pixel_clock = adjusted_mode->clock; | 
| 1328 | 1328 | ||
| 1329 | if (ASIC_IS_AVIVO(rdev)) { | 1329 | if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE4(rdev)) { | 
| 1330 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)) | 1330 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)) | 
| 1331 | atombios_yuv_setup(encoder, true); | 1331 | atombios_yuv_setup(encoder, true); | 
| 1332 | else | 1332 | else | 
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index d3657dcfdd26..c633319f98ed 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c  | |||
| @@ -165,7 +165,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc) | |||
| 165 | { | 165 | { | 
| 166 | struct radeon_device *rdev = dev->dev_private; | 166 | struct radeon_device *rdev = dev->dev_private; | 
| 167 | 167 | ||
| 168 | if (crtc < 0 || crtc > 1) { | 168 | if (crtc < 0 || crtc >= rdev->num_crtc) { | 
| 169 | DRM_ERROR("Invalid crtc %d\n", crtc); | 169 | DRM_ERROR("Invalid crtc %d\n", crtc); | 
| 170 | return -EINVAL; | 170 | return -EINVAL; | 
| 171 | } | 171 | } | 
| @@ -177,7 +177,7 @@ int radeon_enable_vblank_kms(struct drm_device *dev, int crtc) | |||
| 177 | { | 177 | { | 
| 178 | struct radeon_device *rdev = dev->dev_private; | 178 | struct radeon_device *rdev = dev->dev_private; | 
| 179 | 179 | ||
| 180 | if (crtc < 0 || crtc > 1) { | 180 | if (crtc < 0 || crtc >= rdev->num_crtc) { | 
| 181 | DRM_ERROR("Invalid crtc %d\n", crtc); | 181 | DRM_ERROR("Invalid crtc %d\n", crtc); | 
| 182 | return -EINVAL; | 182 | return -EINVAL; | 
| 183 | } | 183 | } | 
| @@ -191,7 +191,7 @@ void radeon_disable_vblank_kms(struct drm_device *dev, int crtc) | |||
| 191 | { | 191 | { | 
| 192 | struct radeon_device *rdev = dev->dev_private; | 192 | struct radeon_device *rdev = dev->dev_private; | 
| 193 | 193 | ||
| 194 | if (crtc < 0 || crtc > 1) { | 194 | if (crtc < 0 || crtc >= rdev->num_crtc) { | 
| 195 | DRM_ERROR("Invalid crtc %d\n", crtc); | 195 | DRM_ERROR("Invalid crtc %d\n", crtc); | 
| 196 | return; | 196 | return; | 
| 197 | } | 197 | } | 
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 7ab23e006e4c..2c5f9a0e5d72 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c  | |||
| @@ -1005,15 +1005,8 @@ static int elf_fdpic_map_file_constdisp_on_uclinux( | |||
| 1005 | } | 1005 | } | 
| 1006 | } else if (!mm->start_data) { | 1006 | } else if (!mm->start_data) { | 
| 1007 | mm->start_data = seg->addr; | 1007 | mm->start_data = seg->addr; | 
| 1008 | #ifndef CONFIG_MMU | ||
| 1009 | mm->end_data = seg->addr + phdr->p_memsz; | 1008 | mm->end_data = seg->addr + phdr->p_memsz; | 
| 1010 | #endif | ||
| 1011 | } | 1009 | } | 
| 1012 | |||
| 1013 | #ifdef CONFIG_MMU | ||
| 1014 | if (seg->addr + phdr->p_memsz > mm->end_data) | ||
| 1015 | mm->end_data = seg->addr + phdr->p_memsz; | ||
| 1016 | #endif | ||
| 1017 | } | 1010 | } | 
| 1018 | 1011 | ||
| 1019 | seg++; | 1012 | seg++; | 
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index e1703175ee28..34ccf815ea8a 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c  | |||
| @@ -161,10 +161,10 @@ static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) | |||
| 161 | argp->p = page_address(argp->pagelist[0]); | 161 | argp->p = page_address(argp->pagelist[0]); | 
| 162 | argp->pagelist++; | 162 | argp->pagelist++; | 
| 163 | if (argp->pagelen < PAGE_SIZE) { | 163 | if (argp->pagelen < PAGE_SIZE) { | 
| 164 | argp->end = p + (argp->pagelen>>2); | 164 | argp->end = argp->p + (argp->pagelen>>2); | 
| 165 | argp->pagelen = 0; | 165 | argp->pagelen = 0; | 
| 166 | } else { | 166 | } else { | 
| 167 | argp->end = p + (PAGE_SIZE>>2); | 167 | argp->end = argp->p + (PAGE_SIZE>>2); | 
| 168 | argp->pagelen -= PAGE_SIZE; | 168 | argp->pagelen -= PAGE_SIZE; | 
| 169 | } | 169 | } | 
| 170 | memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); | 170 | memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); | 
| @@ -1426,10 +1426,10 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) | |||
| 1426 | argp->p = page_address(argp->pagelist[0]); | 1426 | argp->p = page_address(argp->pagelist[0]); | 
| 1427 | argp->pagelist++; | 1427 | argp->pagelist++; | 
| 1428 | if (argp->pagelen < PAGE_SIZE) { | 1428 | if (argp->pagelen < PAGE_SIZE) { | 
| 1429 | argp->end = p + (argp->pagelen>>2); | 1429 | argp->end = argp->p + (argp->pagelen>>2); | 
| 1430 | argp->pagelen = 0; | 1430 | argp->pagelen = 0; | 
| 1431 | } else { | 1431 | } else { | 
| 1432 | argp->end = p + (PAGE_SIZE>>2); | 1432 | argp->end = argp->p + (PAGE_SIZE>>2); | 
| 1433 | argp->pagelen -= PAGE_SIZE; | 1433 | argp->pagelen -= PAGE_SIZE; | 
| 1434 | } | 1434 | } | 
| 1435 | } | 1435 | } | 
diff --git a/fs/proc/base.c b/fs/proc/base.c index 7621db800a74..8418fcc0a6ab 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c  | |||
| @@ -2909,7 +2909,7 @@ out_no_task: | |||
| 2909 | */ | 2909 | */ | 
| 2910 | static const struct pid_entry tid_base_stuff[] = { | 2910 | static const struct pid_entry tid_base_stuff[] = { | 
| 2911 | DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations), | 2911 | DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations), | 
| 2912 | DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fd_operations), | 2912 | DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fdinfo_operations), | 
| 2913 | REG("environ", S_IRUSR, proc_environ_operations), | 2913 | REG("environ", S_IRUSR, proc_environ_operations), | 
| 2914 | INF("auxv", S_IRUSR, proc_pid_auxv), | 2914 | INF("auxv", S_IRUSR, proc_pid_auxv), | 
| 2915 | ONE("status", S_IRUGO, proc_pid_status), | 2915 | ONE("status", S_IRUGO, proc_pid_status), | 
diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index 1cb0d81b164b..653c030eb840 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c  | |||
| @@ -87,9 +87,8 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index, | |||
| 87 | u64 cur_index = index >> msblk->devblksize_log2; | 87 | u64 cur_index = index >> msblk->devblksize_log2; | 
| 88 | int bytes, compressed, b = 0, k = 0, page = 0, avail; | 88 | int bytes, compressed, b = 0, k = 0, page = 0, avail; | 
| 89 | 89 | ||
| 90 | 90 | bh = kcalloc(((srclength + msblk->devblksize - 1) | |
| 91 | bh = kcalloc((msblk->block_size >> msblk->devblksize_log2) + 1, | 91 | >> msblk->devblksize_log2) + 1, sizeof(*bh), GFP_KERNEL); | 
| 92 | sizeof(*bh), GFP_KERNEL); | ||
| 93 | if (bh == NULL) | 92 | if (bh == NULL) | 
| 94 | return -ENOMEM; | 93 | return -ENOMEM; | 
| 95 | 94 | ||
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c index 3550aec2f655..48b6f4a385a6 100644 --- a/fs/squashfs/super.c +++ b/fs/squashfs/super.c  | |||
| @@ -275,7 +275,8 @@ allocate_root: | |||
| 275 | 275 | ||
| 276 | err = squashfs_read_inode(root, root_inode); | 276 | err = squashfs_read_inode(root, root_inode); | 
| 277 | if (err) { | 277 | if (err) { | 
| 278 | iget_failed(root); | 278 | make_bad_inode(root); | 
| 279 | iput(root); | ||
| 279 | goto failed_mount; | 280 | goto failed_mount; | 
| 280 | } | 281 | } | 
| 281 | insert_inode_hash(root); | 282 | insert_inode_hash(root); | 
| @@ -353,6 +354,7 @@ static void squashfs_put_super(struct super_block *sb) | |||
| 353 | kfree(sbi->id_table); | 354 | kfree(sbi->id_table); | 
| 354 | kfree(sbi->fragment_index); | 355 | kfree(sbi->fragment_index); | 
| 355 | kfree(sbi->meta_index); | 356 | kfree(sbi->meta_index); | 
| 357 | kfree(sbi->inode_lookup_table); | ||
| 356 | kfree(sb->s_fs_info); | 358 | kfree(sb->s_fs_info); | 
| 357 | sb->s_fs_info = NULL; | 359 | sb->s_fs_info = NULL; | 
| 358 | } | 360 | } | 
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 15a03d0fb9f3..7a603874e483 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c  | |||
| @@ -128,8 +128,9 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer, | |||
| 128 | goto release_mutex; | 128 | goto release_mutex; | 
| 129 | } | 129 | } | 
| 130 | 130 | ||
| 131 | length = stream->total_out; | ||
| 131 | mutex_unlock(&msblk->read_data_mutex); | 132 | mutex_unlock(&msblk->read_data_mutex); | 
| 132 | return stream->total_out; | 133 | return length; | 
| 133 | 134 | ||
| 134 | release_mutex: | 135 | release_mutex: | 
| 135 | mutex_unlock(&msblk->read_data_mutex); | 136 | mutex_unlock(&msblk->read_data_mutex); | 
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index cd27c9d6c71f..5bba29a07812 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c  | |||
| @@ -177,16 +177,26 @@ xfs_swap_extents_check_format( | |||
| 177 | XFS_IFORK_NEXTENTS(ip, XFS_DATA_FORK) > tip->i_df.if_ext_max) | 177 | XFS_IFORK_NEXTENTS(ip, XFS_DATA_FORK) > tip->i_df.if_ext_max) | 
| 178 | return EINVAL; | 178 | return EINVAL; | 
| 179 | 179 | ||
| 180 | /* Check root block of temp in btree form to max in target */ | 180 | /* | 
| 181 | * If we are in a btree format, check that the temp root block will fit | ||
| 182 | * in the target and that it has enough extents to be in btree format | ||
| 183 | * in the target. | ||
| 184 | * | ||
| 185 | * Note that we have to be careful to allow btree->extent conversions | ||
| 186 | * (a common defrag case) which will occur when the temp inode is in | ||
| 187 | * extent format... | ||
| 188 | */ | ||
| 181 | if (tip->i_d.di_format == XFS_DINODE_FMT_BTREE && | 189 | if (tip->i_d.di_format == XFS_DINODE_FMT_BTREE && | 
| 182 | XFS_IFORK_BOFF(ip) && | 190 | ((XFS_IFORK_BOFF(ip) && | 
| 183 | tip->i_df.if_broot_bytes > XFS_IFORK_BOFF(ip)) | 191 | tip->i_df.if_broot_bytes > XFS_IFORK_BOFF(ip)) || | 
| 192 | XFS_IFORK_NEXTENTS(tip, XFS_DATA_FORK) <= ip->i_df.if_ext_max)) | ||
| 184 | return EINVAL; | 193 | return EINVAL; | 
| 185 | 194 | ||
| 186 | /* Check root block of target in btree form to max in temp */ | 195 | /* Reciprocal target->temp btree format checks */ | 
| 187 | if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE && | 196 | if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE && | 
| 188 | XFS_IFORK_BOFF(tip) && | 197 | ((XFS_IFORK_BOFF(tip) && | 
| 189 | ip->i_df.if_broot_bytes > XFS_IFORK_BOFF(tip)) | 198 | ip->i_df.if_broot_bytes > XFS_IFORK_BOFF(tip)) || | 
| 199 | XFS_IFORK_NEXTENTS(ip, XFS_DATA_FORK) <= tip->i_df.if_ext_max)) | ||
| 190 | return EINVAL; | 200 | return EINVAL; | 
| 191 | 201 | ||
| 192 | return 0; | 202 | return 0; | 
| @@ -1977,7 +1977,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | |||
| 1977 | return 0; | 1977 | return 0; | 
| 1978 | 1978 | ||
| 1979 | /* Clean everything up if vma_adjust failed. */ | 1979 | /* Clean everything up if vma_adjust failed. */ | 
| 1980 | new->vm_ops->close(new); | 1980 | if (new->vm_ops && new->vm_ops->close) | 
| 1981 | new->vm_ops->close(new); | ||
| 1981 | if (new->vm_file) { | 1982 | if (new->vm_file) { | 
| 1982 | if (vma->vm_flags & VM_EXECUTABLE) | 1983 | if (vma->vm_flags & VM_EXECUTABLE) | 
| 1983 | removed_exe_file_vma(mm); | 1984 | removed_exe_file_vma(mm); | 
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index ea97c3120d66..d737cea5347c 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c  | |||
| @@ -339,8 +339,10 @@ static int construct_alloc_key(struct key_type *type, | |||
| 339 | 339 | ||
| 340 | key_already_present: | 340 | key_already_present: | 
| 341 | mutex_unlock(&key_construction_mutex); | 341 | mutex_unlock(&key_construction_mutex); | 
| 342 | if (dest_keyring) | 342 | if (dest_keyring) { | 
| 343 | __key_link(dest_keyring, key_ref_to_ptr(key_ref)); | ||
| 343 | up_write(&dest_keyring->sem); | 344 | up_write(&dest_keyring->sem); | 
| 345 | } | ||
| 344 | mutex_unlock(&user->cons_lock); | 346 | mutex_unlock(&user->cons_lock); | 
| 345 | key_put(key); | 347 | key_put(key); | 
| 346 | *_key = key = key_ref_to_ptr(key_ref); | 348 | *_key = key = key_ref_to_ptr(key_ref); | 
| @@ -431,6 +433,11 @@ struct key *request_key_and_link(struct key_type *type, | |||
| 431 | 433 | ||
| 432 | if (!IS_ERR(key_ref)) { | 434 | if (!IS_ERR(key_ref)) { | 
| 433 | key = key_ref_to_ptr(key_ref); | 435 | key = key_ref_to_ptr(key_ref); | 
| 436 | if (dest_keyring) { | ||
| 437 | construct_get_dest_keyring(&dest_keyring); | ||
| 438 | key_link(dest_keyring, key); | ||
| 439 | key_put(dest_keyring); | ||
| 440 | } | ||
| 434 | } else if (PTR_ERR(key_ref) != -EAGAIN) { | 441 | } else if (PTR_ERR(key_ref) != -EAGAIN) { | 
| 435 | key = ERR_CAST(key_ref); | 442 | key = ERR_CAST(key_ref); | 
| 436 | } else { | 443 | } else { | 
