diff options
author | Jean Pihet <jpihet@mvista.com> | 2009-07-24 21:43:25 -0400 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-07-24 21:43:25 -0400 |
commit | 9fb97412c3be5d0d1dd0e9d7c5268469e4c942aa (patch) | |
tree | b9d9dbb03ed73a668986001758eb707bf4add97a | |
parent | 58cda884ecc87dcce18d463b0c8bd928dae63ad8 (diff) |
OMAP3: Setup MUX settings for SDRC CKE signals
This patches ensures the MUX settings are correct for the SDRC
CKE signals to SDRAM. This allows the self-refresh to work when
2 chip-selects are in use.
A warning is thrown away in case the initial muxing is incorrect,
in order to track faulty or old-dated bootloaders.
Note: The CONFIG_OMAP_MUX and CONFIG_OMAP_MUX_WARNINGS options
must be enabled for the mux code to have effect.
Signed-off-by: Jean Pihet <jpihet@mvista.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mux.h | 4 |
6 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 4abefd9566e8..e00ba128cece 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -409,6 +409,10 @@ static void __init omap3_beagle_init(void) | |||
409 | 409 | ||
410 | usb_musb_init(); | 410 | usb_musb_init(); |
411 | omap3beagle_flash_init(); | 411 | omap3beagle_flash_init(); |
412 | |||
413 | /* Ensure SDRC pins are mux'd for self-refresh */ | ||
414 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | ||
415 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | ||
412 | } | 416 | } |
413 | 417 | ||
414 | static void __init omap3_beagle_map_io(void) | 418 | static void __init omap3_beagle_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 9b991ced3822..864ee3d021f7 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <mach/mcspi.h> | 40 | #include <mach/mcspi.h> |
41 | #include <mach/usb.h> | 41 | #include <mach/usb.h> |
42 | #include <mach/keypad.h> | 42 | #include <mach/keypad.h> |
43 | #include <mach/mux.h> | ||
43 | 44 | ||
44 | #include "sdram-micron-mt46h32m32lf-6.h" | 45 | #include "sdram-micron-mt46h32m32lf-6.h" |
45 | #include "mmc-twl4030.h" | 46 | #include "mmc-twl4030.h" |
@@ -398,6 +399,10 @@ static void __init omap3pandora_init(void) | |||
398 | omap3pandora_ads7846_init(); | 399 | omap3pandora_ads7846_init(); |
399 | pandora_keys_gpio_init(); | 400 | pandora_keys_gpio_init(); |
400 | usb_musb_init(); | 401 | usb_musb_init(); |
402 | |||
403 | /* Ensure SDRC pins are mux'd for self-refresh */ | ||
404 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | ||
405 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | ||
401 | } | 406 | } |
402 | 407 | ||
403 | static void __init omap3pandora_map_io(void) | 408 | static void __init omap3pandora_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 44bc1c54cd03..6b171b338ec0 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <mach/gpmc.h> | 44 | #include <mach/gpmc.h> |
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <mach/nand.h> | 46 | #include <mach/nand.h> |
47 | #include <mach/mux.h> | ||
47 | #include <mach/usb.h> | 48 | #include <mach/usb.h> |
48 | 49 | ||
49 | #include "sdram-micron-mt46h32m32lf-6.h" | 50 | #include "sdram-micron-mt46h32m32lf-6.h" |
@@ -396,6 +397,10 @@ static void __init overo_init(void) | |||
396 | overo_ads7846_init(); | 397 | overo_ads7846_init(); |
397 | overo_init_smsc911x(); | 398 | overo_init_smsc911x(); |
398 | 399 | ||
400 | /* Ensure SDRC pins are mux'd for self-refresh */ | ||
401 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | ||
402 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | ||
403 | |||
399 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, | 404 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, |
400 | "OVERO_GPIO_W2W_NRESET") == 0) && | 405 | "OVERO_GPIO_W2W_NRESET") == 0) && |
401 | (gpio_direction_output(OVERO_GPIO_W2W_NRESET, 1) == 0)) { | 406 | (gpio_direction_output(OVERO_GPIO_W2W_NRESET, 1) == 0)) { |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 591ae8a58054..1c9e07fe8266 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -75,6 +75,10 @@ static void __init rx51_init(void) | |||
75 | omap_serial_init(); | 75 | omap_serial_init(); |
76 | usb_musb_init(); | 76 | usb_musb_init(); |
77 | rx51_peripherals_init(); | 77 | rx51_peripherals_init(); |
78 | |||
79 | /* Ensure SDRC pins are mux'd for self-refresh */ | ||
80 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | ||
81 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | ||
78 | } | 82 | } |
79 | 83 | ||
80 | static void __init rx51_map_io(void) | 84 | static void __init rx51_map_io(void) |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 026c4fc883a7..43d6b92b65f2 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -486,6 +486,12 @@ MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c, | |||
486 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | 486 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) |
487 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, | 487 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, |
488 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | 488 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) |
489 | |||
490 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
491 | MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262, | ||
492 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
493 | MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, | ||
494 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
489 | }; | 495 | }; |
490 | 496 | ||
491 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) | 497 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) |
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 85a621705766..80281c458baf 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -853,6 +853,10 @@ enum omap34xx_index { | |||
853 | AE5_34XX_GPIO143, | 853 | AE5_34XX_GPIO143, |
854 | H19_34XX_GPIO164_OUT, | 854 | H19_34XX_GPIO164_OUT, |
855 | J25_34XX_GPIO170, | 855 | J25_34XX_GPIO170, |
856 | |||
857 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
858 | H16_34XX_SDRC_CKE0, | ||
859 | H17_34XX_SDRC_CKE1, | ||
856 | }; | 860 | }; |
857 | 861 | ||
858 | struct omap_mux_cfg { | 862 | struct omap_mux_cfg { |