Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus/samsung-2635' of git://git.fluff.org/bjdooks/linux

* 'for-linus/samsung-2635' of git://git.fluff.org/bjdooks/linux:
DMAENGINE: correct PL080 register header file
ARM: SAMSUNG: Fix on build warning about dependency in Kconfig
ARM: SMDK6410: Make virtual screen twice depth of real
ARM: S3C64XX: Update consistent DMA size to 8MiB
ARM: S3C64XX: Add audio support to SmartQ
ARM: S3C64XX: Framebuffer fix for SmartQ5
ARM: S3C64XX: Set wifi and iNAND as permanently connected SD devices on SmartQ boards
ARM: S3C64XX: Move SmartQ LCD control platform definition to shared file
ARM: mach-real6410: add sdhc device support
ARM: mach-real6410: add dm9000 ethernet support for mach-real6410
ARM: S3C64XX: Support for Real6410

Fix up trivial conflicts in arch/arm/mach-s3c64xx/mach-smartq5.c
("remove pixclock" vs "Framebuffer fix for SmartQ5")

+213 -65
+3 -1
arch/arm/include/asm/hardware/pl080.h
··· 43 43 44 44 /* Per channel configuration registers */ 45 45 46 - #define PL008_Cx_STRIDE (0x20) 46 + #define PL080_Cx_STRIDE (0x20) 47 47 #define PL080_Cx_BASE(x) ((0x100 + (x * 0x20))) 48 48 #define PL080_Cx_SRC_ADDR(x) ((0x100 + (x * 0x20))) 49 49 #define PL080_Cx_DST_ADDR(x) ((0x104 + (x * 0x20))) ··· 68 68 #define PL080_CONTROL_TC_IRQ_EN (1 << 31) 69 69 #define PL080_CONTROL_PROT_MASK (0x7 << 28) 70 70 #define PL080_CONTROL_PROT_SHIFT (28) 71 + #define PL080_CONTROL_PROT_CACHE (1 << 30) 72 + #define PL080_CONTROL_PROT_BUFF (1 << 29) 71 73 #define PL080_CONTROL_PROT_SYS (1 << 28) 72 74 #define PL080_CONTROL_DST_INCR (1 << 27) 73 75 #define PL080_CONTROL_SRC_INCR (1 << 26)
+9
arch/arm/mach-s3c64xx/Kconfig
··· 98 98 help 99 99 Machine support for the A&W6410 100 100 101 + config MACH_REAL6410 102 + bool "REAL6410" 103 + select CPU_S3C6410 104 + select S3C_DEV_HSMMC 105 + select S3C_DEV_HSMMC1 106 + select S3C64XX_SETUP_SDHCI 107 + help 108 + Machine support for the CoreWind REAL6410 109 + 101 110 config MACH_SMDK6410 102 111 bool "SMDK6410" 103 112 select CPU_S3C6410
+1
arch/arm/mach-s3c64xx/Makefile
··· 52 52 obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o 53 53 obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o 54 54 obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o 55 + obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o 55 56 obj-$(CONFIG_MACH_NCP) += mach-ncp.o 56 57 obj-$(CONFIG_MACH_HMT) += mach-hmt.o 57 58 obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o
+1 -1
arch/arm/mach-s3c64xx/dma.c
··· 697 697 chptr->number = chno; 698 698 chptr->dmac = dmac; 699 699 chptr->regs = regptr; 700 - regptr += PL008_Cx_STRIDE; 700 + regptr += PL080_Cx_STRIDE; 701 701 } 702 702 703 703 /* for the moment, permanently enable the controller */
+2
arch/arm/mach-s3c64xx/include/mach/memory.h
··· 15 15 16 16 #define PHYS_OFFSET UL(0x50000000) 17 17 18 + #define CONSISTENT_DMA_SIZE SZ_8M 19 + 18 20 #endif
+152
arch/arm/mach-s3c64xx/mach-real6410.c
··· 1 + /* linux/arch/arm/mach-s3c64xx/mach-real6410.c 2 + * 3 + * Copyright 2010 Darius Augulis <augulis.darius@gmail.com> 4 + * Copyright 2008 Openmoko, Inc. 5 + * Copyright 2008 Simtec Electronics 6 + * Ben Dooks <ben@simtec.co.uk> 7 + * http://armlinux.simtec.co.uk/ 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + * 13 + */ 14 + 15 + #include <linux/kernel.h> 16 + #include <linux/types.h> 17 + #include <linux/interrupt.h> 18 + #include <linux/list.h> 19 + #include <linux/init.h> 20 + #include <linux/dm9000.h> 21 + #include <linux/serial_core.h> 22 + #include <linux/platform_device.h> 23 + #include <asm/mach-types.h> 24 + #include <asm/mach/arch.h> 25 + #include <asm/mach/map.h> 26 + #include <mach/map.h> 27 + #include <mach/s3c6410.h> 28 + #include <mach/regs-srom.h> 29 + #include <plat/cpu.h> 30 + #include <plat/devs.h> 31 + #include <plat/regs-serial.h> 32 + 33 + #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK 34 + #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB 35 + #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE 36 + 37 + static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = { 38 + [0] = { 39 + .hwport = 0, 40 + .flags = 0, 41 + .ucon = UCON, 42 + .ulcon = ULCON, 43 + .ufcon = UFCON, 44 + }, 45 + [1] = { 46 + .hwport = 1, 47 + .flags = 0, 48 + .ucon = UCON, 49 + .ulcon = ULCON, 50 + .ufcon = UFCON, 51 + }, 52 + [2] = { 53 + .hwport = 2, 54 + .flags = 0, 55 + .ucon = UCON, 56 + .ulcon = ULCON, 57 + .ufcon = UFCON, 58 + }, 59 + [3] = { 60 + .hwport = 3, 61 + .flags = 0, 62 + .ucon = UCON, 63 + .ulcon = ULCON, 64 + .ufcon = UFCON, 65 + }, 66 + }; 67 + 68 + /* DM9000AEP 10/100 ethernet controller */ 69 + 70 + static struct resource real6410_dm9k_resource[] = { 71 + [0] = { 72 + .start = S3C64XX_PA_XM0CSN1, 73 + .end = S3C64XX_PA_XM0CSN1 + 1, 74 + .flags = IORESOURCE_MEM 75 + }, 76 + [1] = { 77 + .start = S3C64XX_PA_XM0CSN1 + 4, 78 + .end = S3C64XX_PA_XM0CSN1 + 5, 79 + .flags = IORESOURCE_MEM 80 + }, 81 + [2] = { 82 + .start = S3C_EINT(7), 83 + .end = S3C_EINT(7), 84 + .flags = IORESOURCE_IRQ, 85 + } 86 + }; 87 + 88 + static struct dm9000_plat_data real6410_dm9k_pdata = { 89 + .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), 90 + }; 91 + 92 + static struct platform_device real6410_device_eth = { 93 + .name = "dm9000", 94 + .id = -1, 95 + .num_resources = ARRAY_SIZE(real6410_dm9k_resource), 96 + .resource = real6410_dm9k_resource, 97 + .dev = { 98 + .platform_data = &real6410_dm9k_pdata, 99 + }, 100 + }; 101 + 102 + static struct platform_device *real6410_devices[] __initdata = { 103 + &real6410_device_eth, 104 + &s3c_device_hsmmc0, 105 + &s3c_device_hsmmc1, 106 + }; 107 + 108 + static void __init real6410_map_io(void) 109 + { 110 + s3c64xx_init_io(NULL, 0); 111 + s3c24xx_init_clocks(12000000); 112 + s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); 113 + } 114 + 115 + static void __init real6410_machine_init(void) 116 + { 117 + u32 cs1; 118 + 119 + /* configure nCS1 width to 16 bits */ 120 + 121 + cs1 = __raw_readl(S3C64XX_SROM_BW) & 122 + ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT); 123 + cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) | 124 + (1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) | 125 + (1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) << 126 + S3C64XX_SROM_BW__NCS1__SHIFT; 127 + __raw_writel(cs1, S3C64XX_SROM_BW); 128 + 129 + /* set timing for nCS1 suitable for ethernet chip */ 130 + 131 + __raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) | 132 + (6 << S3C64XX_SROM_BCX__TACP__SHIFT) | 133 + (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) | 134 + (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) | 135 + (13 << S3C64XX_SROM_BCX__TACC__SHIFT) | 136 + (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) | 137 + (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1); 138 + 139 + platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices)); 140 + } 141 + 142 + MACHINE_START(REAL6410, "REAL6410") 143 + /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ 144 + .phys_io = S3C_PA_UART & 0xfff00000, 145 + .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, 146 + .boot_params = S3C64XX_PA_SDRAM + 0x100, 147 + 148 + .init_irq = s3c6410_init_irq, 149 + .map_io = real6410_map_io, 150 + .init_machine = real6410_machine_init, 151 + .timer = &s3c24xx_timer, 152 + MACHINE_END
+38 -2
arch/arm/mach-s3c64xx/mach-smartq.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/pwm_backlight.h> 18 18 #include <linux/serial_core.h> 19 + #include <linux/spi/spi_gpio.h> 19 20 #include <linux/usb/gpio_vbus.h> 20 21 21 22 #include <asm/mach-types.h> ··· 167 166 168 167 static struct s3c_sdhci_platdata smartq_internal_hsmmc_pdata = { 169 168 .max_width = 4, 170 - /*.broken_card_detection = true,*/ 169 + .cd_type = S3C_SDHCI_CD_PERMANENT, 171 170 }; 172 171 173 172 static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { ··· 185 184 }, 186 185 }; 187 186 187 + static int __init smartq_lcd_setup_gpio(void) 188 + { 189 + int ret; 190 + 191 + ret = gpio_request(S3C64XX_GPM(3), "LCD power"); 192 + if (ret < 0) 193 + return ret; 194 + 195 + /* turn power off */ 196 + gpio_direction_output(S3C64XX_GPM(3), 0); 197 + 198 + return 0; 199 + } 200 + 201 + /* GPM0 -> CS */ 202 + static struct spi_gpio_platform_data smartq_lcd_control = { 203 + .sck = S3C64XX_GPM(1), 204 + .mosi = S3C64XX_GPM(2), 205 + .miso = S3C64XX_GPM(2), 206 + }; 207 + 208 + static struct platform_device smartq_lcd_control_device = { 209 + .name = "spi-gpio", 210 + .id = 1, 211 + .dev.platform_data = &smartq_lcd_control, 212 + }; 213 + 188 214 static void smartq_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) 189 215 { 190 216 gpio_direction_output(S3C64XX_GPM(3), power); ··· 227 199 .dev.platform_data = &smartq_lcd_power_data, 228 200 }; 229 201 202 + static struct i2c_board_info smartq_i2c_devs[] __initdata = { 203 + { I2C_BOARD_INFO("wm8987", 0x1a), }, 204 + }; 230 205 231 206 static struct platform_device *smartq_devices[] __initdata = { 232 207 &s3c_device_hsmmc1, /* Init iNAND first, ... */ ··· 244 213 &s3c_device_timer[1], 245 214 &s3c_device_ts, 246 215 &s3c_device_usb_hsotg, 216 + &s3c64xx_device_iis0, 247 217 &smartq_backlight_device, 218 + &smartq_lcd_control_device, 248 219 &smartq_lcd_power_device, 249 220 &smartq_usb_otg_vbus_dev, 250 221 }; ··· 284 251 285 252 /* leave power on */ 286 253 gpio_direction_output(S3C64XX_GPK(15), 0); 287 - 288 254 289 255 pm_power_off = smartq_power_off; 290 256 ··· 386 354 s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); 387 355 s3c24xx_ts_set_platdata(&smartq_touchscreen_pdata); 388 356 357 + i2c_register_board_info(0, smartq_i2c_devs, 358 + ARRAY_SIZE(smartq_i2c_devs)); 359 + 360 + WARN_ON(smartq_lcd_setup_gpio()); 389 361 WARN_ON(smartq_power_off_init()); 390 362 WARN_ON(smartq_usb_host_init()); 391 363 WARN_ON(smartq_usb_otg_init());
+4 -32
arch/arm/mach-s3c64xx/mach-smartq5.c
··· 12 12 #include <linux/fb.h> 13 13 #include <linux/gpio.h> 14 14 #include <linux/gpio_keys.h> 15 - #include <linux/i2c-gpio.h> 16 15 #include <linux/init.h> 17 16 #include <linux/input.h> 18 17 #include <linux/leds.h> ··· 31 32 #include <plat/gpio-cfg.h> 32 33 33 34 #include "mach-smartq.h" 34 - 35 - static void __init smartq5_lcd_setup_gpio(void) 36 - { 37 - gpio_request(S3C64XX_GPM(0), "LCD SCEN pin"); 38 - gpio_request(S3C64XX_GPM(1), "LCD SCL pin"); 39 - gpio_request(S3C64XX_GPM(2), "LCD SDA pin"); 40 - gpio_request(S3C64XX_GPM(3), "LCD power"); 41 - 42 - /* turn power off */ 43 - gpio_direction_output(S3C64XX_GPM(0), 1); 44 - gpio_direction_input(S3C64XX_GPM(1)); 45 - gpio_direction_input(S3C64XX_GPM(2)); 46 - gpio_direction_output(S3C64XX_GPM(3), 0); 47 - } 48 - 49 - static struct i2c_gpio_platform_data smartq5_lcd_control = { 50 - .sda_pin = S3C64XX_GPM(2), 51 - .scl_pin = S3C64XX_GPM(1), 52 - }; 53 - 54 - static struct platform_device smartq5_lcd_control_device = { 55 - .name = "i2c-gpio", 56 - .id = 1, 57 - .dev.platform_data = &smartq5_lcd_control, 58 - }; 59 35 60 36 static struct gpio_led smartq5_leds[] __initdata = { 61 37 { ··· 108 134 109 135 static struct s3c_fb_pd_win smartq5_fb_win0 = { 110 136 .win_mode = { 111 - .left_margin = 40, 112 - .right_margin = 216, 113 - .upper_margin = 10, 114 - .lower_margin = 35, 137 + .left_margin = 216, 138 + .right_margin = 40, 139 + .upper_margin = 35, 140 + .lower_margin = 10, 115 141 .hsync_len = 1, 116 142 .vsync_len = 1, 117 143 .xres = 800, ··· 133 159 static struct platform_device *smartq5_devices[] __initdata = { 134 160 &smartq5_leds_device, 135 161 &smartq5_buttons_device, 136 - &smartq5_lcd_control_device, 137 162 }; 138 163 139 164 static void __init smartq5_machine_init(void) ··· 140 167 s3c_fb_set_platdata(&smartq5_lcd_pdata); 141 168 142 169 smartq_machine_init(); 143 - smartq5_lcd_setup_gpio(); 144 170 145 171 platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices)); 146 172 }
-28
arch/arm/mach-s3c64xx/mach-smartq7.c
··· 12 12 #include <linux/fb.h> 13 13 #include <linux/gpio.h> 14 14 #include <linux/gpio_keys.h> 15 - #include <linux/i2c-gpio.h> 16 15 #include <linux/init.h> 17 16 #include <linux/input.h> 18 17 #include <linux/leds.h> ··· 31 32 #include <plat/gpio-cfg.h> 32 33 33 34 #include "mach-smartq.h" 34 - 35 - static void __init smartq7_lcd_setup_gpio(void) 36 - { 37 - gpio_request(S3C64XX_GPM(0), "LCD CSB pin"); 38 - gpio_request(S3C64XX_GPM(3), "LCD power"); 39 - gpio_request(S3C64XX_GPM(4), "LCD power status"); 40 - 41 - /* turn power off */ 42 - gpio_direction_output(S3C64XX_GPM(0), 1); 43 - gpio_direction_output(S3C64XX_GPM(3), 0); 44 - gpio_direction_input(S3C64XX_GPM(4)); 45 - } 46 - 47 - static struct i2c_gpio_platform_data smartq7_lcd_control = { 48 - .sda_pin = S3C64XX_GPM(2), 49 - .scl_pin = S3C64XX_GPM(1), 50 - .sda_is_open_drain = 1, 51 - .scl_is_open_drain = 1, 52 - }; 53 - 54 - static struct platform_device smartq7_lcd_control_device = { 55 - .name = "i2c-gpio", 56 - .id = 1, 57 - .dev.platform_data = &smartq7_lcd_control, 58 - }; 59 35 60 36 static struct gpio_led smartq7_leds[] __initdata = { 61 37 { ··· 149 175 static struct platform_device *smartq7_devices[] __initdata = { 150 176 &smartq7_leds_device, 151 177 &smartq7_buttons_device, 152 - &smartq7_lcd_control_device, 153 178 }; 154 179 155 180 static void __init smartq7_machine_init(void) ··· 156 183 s3c_fb_set_platdata(&smartq7_lcd_pdata); 157 184 158 185 smartq_machine_init(); 159 - smartq7_lcd_setup_gpio(); 160 186 161 187 platform_add_devices(smartq7_devices, ARRAY_SIZE(smartq7_devices)); 162 188 }
+2
arch/arm/mach-s3c64xx/mach-smdk6410.c
··· 155 155 }, 156 156 .max_bpp = 32, 157 157 .default_bpp = 16, 158 + .virtual_y = 480 * 2, 159 + .virtual_x = 800, 158 160 }; 159 161 160 162 /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
+1 -1
arch/arm/plat-samsung/Kconfig
··· 6 6 7 7 config PLAT_SAMSUNG 8 8 bool 9 - depends on ARCH_S3C2410 || ARCH_S3C24A0 || ARCH_S3C64XX 9 + depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P 10 10 select NO_IOPORT 11 11 default y 12 12 help