Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123871
b: refs/heads/master
c: 7f27543
h: refs/heads/master
i:
  123869: f2a9269
  123867: 2c55f56
  123863: 82208ad
  123855: d3db57b
  123839: a4e4aec
v: v3
  • Loading branch information
Ben Dooks committed Dec 18, 2008
1 parent 87b3712 commit f9ded02
Show file tree
Hide file tree
Showing 13 changed files with 537 additions and 4 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: a9c5d23ac724a3b908833cafbbbd49abe4741b86
refs/heads/master: 7f2754378f3522a42daafdbb9d2385f341008454
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
8 changes: 8 additions & 0 deletions trunk/arch/arm/plat-s3c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ config S3C_BOOT_ERROR_RESET
Say y here to use the watchdog to reset the system if the
kernel decompressor detects an error during decompression.

config S3C_BOOT_UART_FORCE_FIFO
bool "Force UART FIFO on during boot process"
depends on PLAT_S3C
default y
help
Say Y here to force the UART FIFOs on during the kernel
uncompressor

comment "Power management"

config S3C2410_PM_DEBUG
Expand Down
29 changes: 29 additions & 0 deletions trunk/arch/arm/plat-s3c/include/plat/adc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* arch/arm/plat-s3c/include/plat/adc.h
*
* Copyright (c) 2008 Simtec Electronics
* http://armlinux.simnte.co.uk/
* Ben Dooks <ben@simtec.co.uk>
*
* S3C24XX ADC driver information
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __ASM_PLAT_ADC_H
#define __ASM_PLAT_ADC_H __FILE__

struct s3c_adc_client;

extern int s3c_adc_start(struct s3c_adc_client *client,
unsigned int channel, unsigned int nr_samples);

extern struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev,
void (*select)(unsigned selected),
void (*conv)(unsigned d0, unsigned d1),
unsigned int is_ts);

extern void s3c_adc_release(struct s3c_adc_client *client);

#endif /* __ASM_PLAT_ADC_H */
28 changes: 28 additions & 0 deletions trunk/arch/arm/plat-s3c/include/plat/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,28 @@ static void arch_decomp_error(const char *x)

static void error(char *err);

#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
static inline void arch_enable_uart_fifo(void)
{
u32 fifocon = uart_rd(S3C2410_UFCON);

if (!(fifocon & S3C2410_UFCON_FIFOMODE)) {
fifocon |= S3C2410_UFCON_RESETBOTH;
uart_wr(S3C2410_UFCON, fifocon);

/* wait for fifo reset to complete */
while (1) {
fifocon = uart_rd(S3C2410_UFCON);
if (!(fifocon & S3C2410_UFCON_RESETBOTH))
break;
}
}
}
#else
#define arch_enable_uart_fifo() do { } while(0)
#endif


static void
arch_decomp_setup(void)
{
Expand All @@ -149,6 +171,12 @@ arch_decomp_setup(void)

arch_detect_cpu();
arch_decomp_wdog_start();

/* Enable the UART FIFOs if they where not enabled and our
* configuration says we should turn them on.
*/

arch_enable_uart_fifo();
}


Expand Down
28 changes: 28 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 All @@ -62,6 +83,13 @@ config S3C2410_DMA_DEBUG
Enable debugging output for the DMA code. This option sends info
to the kernel log, at priority KERN_DEBUG.

config S3C24XX_ADC
bool "ADC common driver support"
help
Core support for the ADC block found in the S3C24XX SoC systems
for drivers such as the touchscreen and hwmon to use to share
this resource.

# SPI default pin configuration code

config S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-s3c24xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ obj-$(CONFIG_PM) += sleep.o
obj-$(CONFIG_HAVE_PWM) += pwm.o
obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o
obj-$(CONFIG_S3C2410_DMA) += dma.o
obj-$(CONFIG_S3C24XX_ADC) += adc.o

# SPI gpio central GPIO functions

Expand Down
Loading

0 comments on commit f9ded02

Please sign in to comment.