Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
mmc: Add MMC_PROGRESS_*
mmc, ARM: Rename SuperH Mobile ARM zboot helpers
ARM: mach-shmobile: add coherent DMA mask to CEU camera devices
ARM: mach-shmobile: Dynamic backlight control for Mackerel

+59 -32
+7 -6
arch/arm/boot/compressed/mmcif-sh7372.c
··· 10 */ 11 12 #include <linux/mmc/sh_mmcif.h> 13 - #include <mach/mmcif.h> 14 15 #define MMCIF_BASE (void __iomem *)0xe6bd0000 16 ··· 42 */ 43 asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) 44 { 45 - mmcif_init_progress(); 46 - mmcif_update_progress(MMCIF_PROGRESS_ENTER); 47 48 /* Initialise MMC 49 * registers: PORT84CR-PORT92CR ··· 69 /* Enable clock to MMC hardware block */ 70 __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3); 71 72 - mmcif_update_progress(MMCIF_PROGRESS_INIT); 73 74 /* setup MMCIF hardware */ 75 sh_mmcif_boot_init(MMCIF_BASE); 76 77 - mmcif_update_progress(MMCIF_PROGRESS_LOAD); 78 79 /* load kernel via MMCIF interface */ 80 sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */ ··· 84 /* Disable clock to MMC hardware block */ 85 __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); 86 87 - mmcif_update_progress(MMCIF_PROGRESS_DONE); 88 }
··· 10 */ 11 12 #include <linux/mmc/sh_mmcif.h> 13 + #include <linux/mmc/boot.h> 14 + #include <mach/mmc.h> 15 16 #define MMCIF_BASE (void __iomem *)0xe6bd0000 17 ··· 41 */ 42 asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) 43 { 44 + mmc_init_progress(); 45 + mmc_update_progress(MMC_PROGRESS_ENTER); 46 47 /* Initialise MMC 48 * registers: PORT84CR-PORT92CR ··· 68 /* Enable clock to MMC hardware block */ 69 __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3); 70 71 + mmc_update_progress(MMC_PROGRESS_INIT); 72 73 /* setup MMCIF hardware */ 74 sh_mmcif_boot_init(MMCIF_BASE); 75 76 + mmc_update_progress(MMC_PROGRESS_LOAD); 77 78 /* load kernel via MMCIF interface */ 79 sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */ ··· 83 /* Disable clock to MMC hardware block */ 84 __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); 85 86 + mmc_update_progress(MMC_PROGRESS_DONE); 87 }
+2 -1
arch/arm/mach-shmobile/board-ap4evb.c
··· 923 .num_resources = ARRAY_SIZE(ceu_resources), 924 .resource = ceu_resources, 925 .dev = { 926 - .platform_data = &sh_mobile_ceu_info, 927 }, 928 }; 929
··· 923 .num_resources = ARRAY_SIZE(ceu_resources), 924 .resource = ceu_resources, 925 .dev = { 926 + .platform_data = &sh_mobile_ceu_info, 927 + .coherent_dma_mask = 0xffffffff, 928 }, 929 }; 930
+23 -2
arch/arm/mach-shmobile/board-mackerel.c
··· 295 }, 296 }; 297 298 static struct sh_mobile_lcdc_info lcdc_info = { 299 .clock_source = LCDC_CLK_BUS, 300 .ch[0] = { ··· 319 .flags = 0, 320 .lcd_size_cfg.width = 152, 321 .lcd_size_cfg.height = 91, 322 } 323 }; 324 ··· 921 .num_resources = ARRAY_SIZE(ceu_resources), 922 .resource = ceu_resources, 923 .dev = { 924 - .platform_data = &sh_mobile_ceu_info, 925 }, 926 }; 927 ··· 1080 gpio_request(GPIO_FN_LCDDCK, NULL); 1081 1082 gpio_request(GPIO_PORT31, NULL); /* backlight */ 1083 - gpio_direction_output(GPIO_PORT31, 1); 1084 1085 gpio_request(GPIO_PORT151, NULL); /* LCDDON */ 1086 gpio_direction_output(GPIO_PORT151, 1);
··· 295 }, 296 }; 297 298 + static int mackerel_set_brightness(void *board_data, int brightness) 299 + { 300 + gpio_set_value(GPIO_PORT31, brightness); 301 + 302 + return 0; 303 + } 304 + 305 + static int mackerel_get_brightness(void *board_data) 306 + { 307 + return gpio_get_value(GPIO_PORT31); 308 + } 309 + 310 static struct sh_mobile_lcdc_info lcdc_info = { 311 .clock_source = LCDC_CLK_BUS, 312 .ch[0] = { ··· 307 .flags = 0, 308 .lcd_size_cfg.width = 152, 309 .lcd_size_cfg.height = 91, 310 + .board_cfg = { 311 + .set_brightness = mackerel_set_brightness, 312 + .get_brightness = mackerel_get_brightness, 313 + }, 314 + .bl_info = { 315 + .name = "sh_mobile_lcdc_bl", 316 + .max_brightness = 1, 317 + }, 318 } 319 }; 320 ··· 901 .num_resources = ARRAY_SIZE(ceu_resources), 902 .resource = ceu_resources, 903 .dev = { 904 + .platform_data = &sh_mobile_ceu_info, 905 + .coherent_dma_mask = 0xffffffff, 906 }, 907 }; 908 ··· 1059 gpio_request(GPIO_FN_LCDDCK, NULL); 1060 1061 gpio_request(GPIO_PORT31, NULL); /* backlight */ 1062 + gpio_direction_output(GPIO_PORT31, 0); /* off by default */ 1063 1064 gpio_request(GPIO_PORT151, NULL); /* LCDDON */ 1065 gpio_direction_output(GPIO_PORT151, 1);
+5 -5
arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h
··· 1 - #ifndef MMCIF_AP4EB_H 2 - #define MMCIF_AP4EB_H 3 4 #define PORT185CR (void __iomem *)0xe60520b9 5 #define PORT186CR (void __iomem *)0xe60520ba ··· 8 9 #define PORTR191_160DR (void __iomem *)0xe6056014 10 11 - static inline void mmcif_init_progress(void) 12 { 13 /* Initialise LEDS1-4 14 * registers: PORT185CR-PORT188CR (LED1-LED4 Control) ··· 20 __raw_writeb(0x10, PORT188CR); 21 } 22 23 - static inline void mmcif_update_progress(int n) 24 { 25 __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) | 26 (1 << (25 + n)), PORTR191_160DR); 27 } 28 29 - #endif /* MMCIF_AP4EB_H */
··· 1 + #ifndef MMC_AP4EB_H 2 + #define MMC_AP4EB_H 3 4 #define PORT185CR (void __iomem *)0xe60520b9 5 #define PORT186CR (void __iomem *)0xe60520ba ··· 8 9 #define PORTR191_160DR (void __iomem *)0xe6056014 10 11 + static inline void mmc_init_progress(void) 12 { 13 /* Initialise LEDS1-4 14 * registers: PORT185CR-PORT188CR (LED1-LED4 Control) ··· 20 __raw_writeb(0x10, PORT188CR); 21 } 22 23 + static inline void mmc_update_progress(int n) 24 { 25 __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) | 26 (1 << (25 + n)), PORTR191_160DR); 27 } 28 29 + #endif /* MMC_AP4EB_H */
+5 -6
arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
··· 1 - #ifndef MMCIF_MACKEREL_H 2 - #define MMCIF_MACKEREL_H 3 4 #define PORT0CR (void __iomem *)0xe6051000 5 #define PORT1CR (void __iomem *)0xe6051001 ··· 9 #define PORTR031_000DR (void __iomem *)0xe6055000 10 #define PORTL159_128DR (void __iomem *)0xe6054010 11 12 - static inline void mmcif_init_progress(void) 13 { 14 /* Initialise LEDS0-3 15 * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) ··· 21 __raw_writeb(0x10, PORT159CR); 22 } 23 24 - static inline void mmcif_update_progress(int n) 25 { 26 unsigned a = 0, b = 0; 27 ··· 35 __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, 36 PORTL159_128DR); 37 } 38 - 39 - #endif /* MMCIF_MACKEREL_H */
··· 1 + #ifndef MMC_MACKEREL_H 2 + #define MMC_MACKEREL_H 3 4 #define PORT0CR (void __iomem *)0xe6051000 5 #define PORT1CR (void __iomem *)0xe6051001 ··· 9 #define PORTR031_000DR (void __iomem *)0xe6055000 10 #define PORTL159_128DR (void __iomem *)0xe6054010 11 12 + static inline void mmc_init_progress(void) 13 { 14 /* Initialise LEDS0-3 15 * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) ··· 21 __raw_writeb(0x10, PORT159CR); 22 } 23 24 + static inline void mmc_update_progress(int n) 25 { 26 unsigned a = 0, b = 0; 27 ··· 35 __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, 36 PORTL159_128DR); 37 } 38 + #endif /* MMC_MACKEREL_H */
+5 -5
arch/arm/mach-shmobile/include/mach/mmcif.h arch/arm/mach-shmobile/include/mach/mmc.h
··· 1 - #ifndef MMCIF_H 2 - #define MMCIF_H 3 4 /************************************************** 5 * ··· 8 **************************************************/ 9 10 #ifdef CONFIG_MACH_AP4EVB 11 - #include "mach/mmcif-ap4eb.h" 12 #elif CONFIG_MACH_MACKEREL 13 - #include "mach/mmcif-mackerel.h" 14 #else 15 #error "unsupported board." 16 #endif 17 18 - #endif /* MMCIF_H */
··· 1 + #ifndef MMC_H 2 + #define MMC_H 3 4 /************************************************** 5 * ··· 8 **************************************************/ 9 10 #ifdef CONFIG_MACH_AP4EVB 11 + #include "mach/mmc-ap4eb.h" 12 #elif CONFIG_MACH_MACKEREL 13 + #include "mach/mmc-mackerel.h" 14 #else 15 #error "unsupported board." 16 #endif 17 18 + #endif /* MMC_H */
+5 -4
arch/sh/boot/romimage/mmcif-sh7724.c
··· 9 */ 10 11 #include <linux/mmc/sh_mmcif.h> 12 #include <mach/romimage.h> 13 14 #define MMCIF_BASE (void __iomem *)0xa4ca0000 ··· 30 */ 31 asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) 32 { 33 - mmcif_update_progress(MMCIF_PROGRESS_ENTER); 34 35 /* enable clock to the MMCIF hardware block */ 36 __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); ··· 53 /* high drive capability for MMC pins */ 54 __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); 55 56 - mmcif_update_progress(MMCIF_PROGRESS_INIT); 57 58 /* setup MMCIF hardware */ 59 sh_mmcif_boot_init(MMCIF_BASE); 60 61 - mmcif_update_progress(MMCIF_PROGRESS_LOAD); 62 63 /* load kernel via MMCIF interface */ 64 sh_mmcif_boot_do_read(MMCIF_BASE, 512, ··· 68 /* disable clock to the MMCIF hardware block */ 69 __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); 70 71 - mmcif_update_progress(MMCIF_PROGRESS_DONE); 72 }
··· 9 */ 10 11 #include <linux/mmc/sh_mmcif.h> 12 + #include <linux/mmc/boot.h> 13 #include <mach/romimage.h> 14 15 #define MMCIF_BASE (void __iomem *)0xa4ca0000 ··· 29 */ 30 asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) 31 { 32 + mmcif_update_progress(MMC_PROGRESS_ENTER); 33 34 /* enable clock to the MMCIF hardware block */ 35 __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); ··· 52 /* high drive capability for MMC pins */ 53 __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); 54 55 + mmcif_update_progress(MMC_PROGRESS_INIT); 56 57 /* setup MMCIF hardware */ 58 sh_mmcif_boot_init(MMCIF_BASE); 59 60 + mmcif_update_progress(MMC_PROGRESS_LOAD); 61 62 /* load kernel via MMCIF interface */ 63 sh_mmcif_boot_do_read(MMCIF_BASE, 512, ··· 67 /* disable clock to the MMCIF hardware block */ 68 __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); 69 70 + mmcif_update_progress(MMC_PROGRESS_DONE); 71 }
+7
include/linux/mmc/boot.h
···
··· 1 + #ifndef MMC_BOOT_H 2 + #define MMC_BOOT_H 3 + 4 + enum { MMC_PROGRESS_ENTER, MMC_PROGRESS_INIT, 5 + MMC_PROGRESS_LOAD, MMC_PROGRESS_DONE }; 6 + 7 + #endif
-3
include/linux/mmc/sh_mmcif.h
··· 104 105 #define SH_MMCIF_BBS 512 /* boot block size */ 106 107 - enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, 108 - MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; 109 - 110 static inline void sh_mmcif_boot_cmd_send(void __iomem *base, 111 unsigned long cmd, unsigned long arg) 112 {
··· 104 105 #define SH_MMCIF_BBS 512 /* boot block size */ 106 107 static inline void sh_mmcif_boot_cmd_send(void __iomem *base, 108 unsigned long cmd, unsigned long arg) 109 {