add info it50 and add uart0-3 config

This commit is contained in:
lhh 2010-09-08 17:27:32 +08:00
parent 240361a247
commit 15fbdca50a
16 changed files with 3324 additions and 2 deletions

View File

@ -794,6 +794,8 @@ CONFIG_DEVKMEM=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_RK2818=y
CONFIG_UART0_RK2818=y
CONFIG_UART1_RK2818=y
CONFIG_SERIAL_RK2818_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

File diff suppressed because it is too large Load Diff

View File

@ -772,6 +772,7 @@ CONFIG_DEVKMEM=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_RK2818=y
CONFIG_UART1_RK2818=y
CONFIG_SERIAL_RK2818_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

View File

@ -772,6 +772,7 @@ CONFIG_DEVKMEM=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_RK2818=y
CONFIG_UART1_RK2818=y
CONFIG_SERIAL_RK2818_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

View File

@ -779,6 +779,8 @@ CONFIG_DEVKMEM=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_RK2818=y
CONFIG_UART0_RK2818=y
CONFIG_UART1_RK2818=y
CONFIG_SERIAL_RK2818_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

View File

@ -31,6 +31,13 @@ config MACH_RK2818INFO
help
Support for the ROCKCHIP Board For Info Telephone.
config MACH_RK2818INFO_IT50
depends on ARCH_RK2818
default n
bool "ROCKCHIP Board For Info It50"
help
Support for the ROCKCHIP Board For Info IT50 Telephone.
config RK28_GPIO_IRQ
int
default 16 if ARCH_RK2818

View File

@ -10,3 +10,4 @@ obj-$(CONFIG_MACH_RK2818MID) += board-midsdk.o
obj-$(CONFIG_MACH_RK2818PHONE) += board-phonesdk.o
obj-$(CONFIG_MACH_RAHO) += board-raho.o board-raho-rfkill.o
obj-$(CONFIG_MACH_RK2818INFO) += board-infosdk.o board-infosdk-rfkill.o
obj-$(CONFIG_MACH_RK2818INFO_IT50) += board-infoit50.o board-infosdk-rfkill.o

File diff suppressed because it is too large Load Diff

View File

@ -784,7 +784,7 @@ struct soc_camera_link rk2818_iclink = {
* battery devices
* author: lw@rock-chips.com
*****************************************************************************************/
#define CHARGEOK_PIN RK2818_PIN_PA4
#define CHARGEOK_PIN TCA6424_P07
struct rk2818_battery_platform_data rk2818_battery_platdata = {
.charge_ok_pin = CHARGEOK_PIN,
.charge_ok_level = 0,
@ -1444,8 +1444,12 @@ struct rk2818_nand_platform_data rk2818_nand_data = {
/*****************************************/
static struct platform_device *devices[] __initdata = {
#ifdef CONFIG_UART0_RK2818
&rk2818_device_uart0,
#endif
#ifdef CONFIG_UART1_RK2818
&rk2818_device_uart1,
#endif
#ifdef CONFIG_I2C0_RK2818
&rk2818_device_i2c0,
#endif

View File

@ -540,7 +540,9 @@ struct platform_device rk2818_device_dm9k = {
#endif
static struct platform_device *devices[] __initdata = {
#ifdef CONFIG_UART1_RK2818
&rk2818_device_uart1,
#endif
#ifdef CONFIG_I2C0_RK2818
&rk2818_device_i2c0,
#endif

View File

@ -546,7 +546,9 @@ struct platform_device rk2818_device_dm9k = {
#endif
static struct platform_device *devices[] __initdata = {
#ifdef CONFIG_UART1_RK2818
&rk2818_device_uart1,
#endif
#ifdef CONFIG_I2C0_RK2818
&rk2818_device_i2c0,
#endif

View File

@ -1808,8 +1808,12 @@ static struct platform_device *devices[] __initdata = {
#ifdef CONFIG_BT
&raho_rfkill,
#endif
#ifdef CONFIG_UART0_RK2818
&rk2818_device_uart0,
#endif
#ifdef CONFIG_UART1_RK2818
&rk2818_device_uart1,
#endif
#ifdef CONFIG_I2C0_RK2818
&rk2818_device_i2c0,
#endif

View File

@ -176,6 +176,7 @@ struct platform_device rk2818_device_i2c1 = {
.platform_data = &default_i2c1_data,
},
};
#ifdef CONFIG_SPI_FPGA_I2C
struct platform_device rk2818_device_i2c2 = {
.name = "fpga_i2c",
.id = 2,
@ -190,6 +191,8 @@ struct platform_device rk2818_device_i2c3 = {
.platform_data = &default_i2c3_data,
},
};
#endif
#ifdef CONFIG_UART0_RK2818
struct platform_device rk2818_device_uart0 = {
.name = "rk2818_serial",
.id = 0,
@ -199,25 +202,34 @@ struct platform_device rk2818_device_uart0 = {
.platform_data = &rk2818_serial0_platdata,
},
};
#endif
#ifdef CONFIG_UART1_RK2818
struct platform_device rk2818_device_uart1 = {
.name = "rk2818_serial",
.id = 1,
.num_resources = ARRAY_SIZE(resources_uart1),
.resource = resources_uart1,
};
#endif
#ifdef CONFIG_UART2_RK2818
struct platform_device rk2818_device_uart2 = {
.name = "rk2818_serial",
.id = 2,
.num_resources = ARRAY_SIZE(resources_uart2),
.resource = resources_uart2,
.dev = {
.platform_data = &rk2818_serial2_platdata,
},
};
#endif
#ifdef CONFIG_UART3_RK2818
struct platform_device rk2818_device_uart3 = {
.name = "rk2818_serial",
.id = 3,
.num_resources = ARRAY_SIZE(resources_uart3),
.resource = resources_uart3,
};
#endif
/*
* rk2818 spi master device
*/

View File

@ -21,6 +21,7 @@ extern struct platform_device rk2818_device_uart1;
extern struct platform_device rk2818_device_uart2;
extern struct platform_device rk2818_device_uart3;
extern struct rk2818_serial_platform_data rk2818_serial0_platdata;
extern struct rk2818_serial_platform_data rk2818_serial2_platdata;
extern struct platform_device rk2818_device_spim;
extern struct rk2818_spi_platform_data rk2818_spi_platdata;
extern struct platform_device rk2818_device_i2c0;

View File

@ -1482,6 +1482,21 @@ config SERIAL_RK2818
depends on ARM && ARCH_RK2818
select SERIAL_CORE
config UART0_RK2818
bool "RockChip rk2818 serial port 0 support"
depends on SERIAL_RK2818
config UART1_RK2818
bool "RockChip rk2818 serial port 1 support"
depends on SERIAL_RK2818
config UART2_RK2818
bool "RockChip rk2818 serial port 2 support"
depends on SERIAL_RK2818
config UART3_RK2818
bool "RockChip rk2818 serial port 3 support"
depends on SERIAL_RK2818
config SERIAL_RK2818_CONSOLE
bool "Rockchip rk2818 serial console support"

View File

@ -192,6 +192,9 @@ static void flush(struct rk2818_spi *dws)
static void spi_cs_control(struct rk2818_spi *dws, u32 cs)
{
#ifdef CONFIG_MACH_RK2818INFO_IT50
return;
#else
struct rk2818_spi_platform_data *pdata = dws->master->dev.platform_data;
struct spi_cs_gpio *cs_gpios = pdata->chipselect_gpios;
int i;
@ -201,6 +204,7 @@ static void spi_cs_control(struct rk2818_spi *dws, u32 cs)
gpio_direction_output(cs_gpios[i].cs_gpio, GPIO_HIGH);
else
gpio_direction_output(cs_gpios[cs-1].cs_gpio, GPIO_LOW);
#endif
}
static int null_writer(struct rk2818_spi *dws)