Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123824
b: refs/heads/master
c: c6ad115
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks committed Dec 18, 2008
1 parent 5248f17 commit 48cedba
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28ab44c5be60a9b91021a7cc7b4e202775c04764
refs/heads/master: c6ad115876763e4f15055982ecb9579cb7abab5f
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-s3c2410/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
#define gpio_set_value __gpio_set_value
#define gpio_cansleep __gpio_cansleep

/* some boards require extra gpio capacity to support external
* devices that need GPIO.
*/

#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)

#include <asm-generic/gpio.h>
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-s3c2412/mach-jive.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,12 @@ static struct s3c2410_spigpio_info jive_lcd_spi = {
.bus_num = 1,
.pin_clk = S3C2410_GPG8,
.pin_mosi = S3C2410_GPB8,
.num_chipselect = 1,
.chip_select = jive_lcd_spi_chipselect,
};

static struct platform_device jive_device_lcdspi = {
.name = "s3c24xx-spi-gpio",
.name = "spi_s3c24xx_gpio",
.id = 1,
.num_resources = 0,
.dev.platform_data = &jive_lcd_spi,
Expand All @@ -419,11 +420,12 @@ static struct s3c2410_spigpio_info jive_wm8750_spi = {
.bus_num = 2,
.pin_clk = S3C2410_GPB4,
.pin_mosi = S3C2410_GPB9,
.num_chipselect = 1,
.chip_select = jive_wm8750_chipselect,
};

static struct platform_device jive_device_wm8750 = {
.name = "s3c24xx-spi-gpio",
.name = "spi_s3c24xx_gpio",
.id = 2,
.num_resources = 0,
.dev.platform_data = &jive_wm8750_spi,
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-s3c2440/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ config MACH_ANUBIS
select S3C24XX_DCLK
select PM_SIMTEC if PM
select HAVE_PATA_PLATFORM
select S3C24XX_GPIO_EXTRA64
help
Say Y here if you are using the Simtec Electronics ANUBIS
development system
Expand All @@ -41,6 +42,7 @@ config MACH_OSIRIS
select CPU_S3C2440
select S3C24XX_DCLK
select PM_SIMTEC if PM
select S3C24XX_GPIO_EXTRA128
help
Say Y here if you are using the Simtec IM2440D20 module, also
known as the Osiris.
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/mach-s3c2440/mach-anubis.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,24 +366,29 @@ static struct sm501_initdata anubis_sm501_initdata = {
.mask = 0,
},

.devices = SM501_USE_GPIO,

/* set the SDRAM and bus clocks */
.mclk = 72 * MHZ,
.m1xclk = 144 * MHZ,
};

static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = {
[0] = {
.bus_num = 1,
.pin_scl = 44,
.pin_sda = 45,
},
[1] = {
.bus_num = 2,
.pin_scl = 40,
.pin_sda = 41,
},
};

static struct sm501_platdata anubis_sm501_platdata = {
.init = &anubis_sm501_initdata,
.gpio_base = -1,
.gpio_i2c = anubis_sm501_gpio_i2c,
.gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c),
};
Expand Down
44 changes: 44 additions & 0 deletions trunk/arch/arm/mach-s3c2440/mach-at2440evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/mach/irq.h>

#include <mach/hardware.h>
#include <mach/fb.h>
#include <asm/irq.h>
#include <asm/mach-types.h>

Expand All @@ -45,6 +46,7 @@
#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <asm/plat-s3c24xx/mci.h>

static struct map_desc at2440evb_iodesc[] __initdata = {
/* Nothing here */
Expand Down Expand Up @@ -162,19 +164,60 @@ static struct platform_device at2440evb_device_eth = {
},
};

static struct s3c24xx_mci_pdata at2440evb_mci_pdata = {
.gpio_detect = S3C2410_GPG10,
};

/* 7" LCD panel */

static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = {

.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,

.type = S3C2410_LCDCON1_TFT,

.width = 800,
.height = 480,

.pixclock = 33333, /* HCLK 60 MHz, divisor 2 */
.xres = 800,
.yres = 480,
.bpp = 16,
.left_margin = 88,
.right_margin = 40,
.hsync_len = 128,
.upper_margin = 32,
.lower_margin = 11,
.vsync_len = 2,
};

static struct s3c2410fb_mach_info at2440evb_fb_info __initdata = {
.displays = &at2440evb_lcd_cfg,
.num_displays = 1,
.default_display = 0,
};

static struct platform_device *at2440evb_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_wdt,
&s3c_device_adc,
&s3c_device_i2c,
&s3c_device_rtc,
&s3c_device_nand,
&s3c_device_sdi,
&s3c_device_lcd,
&at2440evb_device_eth,
};

static void __init at2440evb_map_io(void)
{
s3c_device_nand.dev.platform_data = &at2440evb_nand_info;
s3c_device_sdi.name = "s3c2440-sdi";
s3c_device_sdi.dev.platform_data = &at2440evb_mci_pdata;

s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
s3c24xx_init_clocks(16934400);
Expand All @@ -183,6 +226,7 @@ static void __init at2440evb_map_io(void)

static void __init at2440evb_init(void)
{
s3c24xx_fb_set_platdata(&at2440evb_fb_info);
platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices));
}

Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/arm/plat-s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ config S3C24XX_PWM
Support for exporting the PWM timer blocks via the pwm device
system.


# gpio configurations

config S3C24XX_GPIO_EXTRA
int
default 128 if S3C24XX_GPIO_EXTRA128
default 64 if S3C24XX_GPIO_EXTRA64
default 0

config S3C24XX_GPIO_EXTRA64
bool
help
Add an extra 64 gpio numbers to the available GPIO pool. This is
available for boards that need extra gpios for external devices.

config S3C24XX_GPIO_EXTRA128
bool
help
Add an extra 128 gpio numbers to the available GPIO pool. This is
available for boards that need extra gpios for external devices.

config PM_SIMTEC
bool
help
Expand Down

0 comments on commit 48cedba

Please sign in to comment.