|  | @@ -186,3 +186,149 @@ static struct platform_device bfin_spi0_device = {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
 | 
	
		
			
				|  |  |  #ifdef CONFIG_SERIAL_BFIN_UART0
 | 
	
		
			
				|  |  | +static struct resource bfin_uart0_resources[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = BFIN_UART_THR,
 | 
	
		
			
				|  |  | +		.end = BFIN_UART_GCTL+2,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_MEM,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_UART0_TX,
 | 
	
		
			
				|  |  | +		.end = IRQ_UART0_TX,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_UART0_RX,
 | 
	
		
			
				|  |  | +		.end = IRQ_UART0_RX,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_UART0_ERROR,
 | 
	
		
			
				|  |  | +		.end = IRQ_UART0_ERROR,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = CH_UART0_TX,
 | 
	
		
			
				|  |  | +		.end = CH_UART0_TX,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_DMA,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = CH_UART0_RX,
 | 
	
		
			
				|  |  | +		.end = CH_UART0_RX,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_DMA,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static unsigned short bfin_uart0_peripherals[] = {
 | 
	
		
			
				|  |  | +	P_UART0_TX, P_UART0_RX, 0
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device bfin_uart0_device = {
 | 
	
		
			
				|  |  | +	.name = "bfin-uart",
 | 
	
		
			
				|  |  | +	.id = 0,
 | 
	
		
			
				|  |  | +	.num_resources = ARRAY_SIZE(bfin_uart0_resources),
 | 
	
		
			
				|  |  | +	.resource = bfin_uart0_resources,
 | 
	
		
			
				|  |  | +	.dev = {
 | 
	
		
			
				|  |  | +		.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
 | 
	
		
			
				|  |  | +#ifdef CONFIG_BFIN_SIR0
 | 
	
		
			
				|  |  | +static struct resource bfin_sir0_resources[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = 0xFFC00400,
 | 
	
		
			
				|  |  | +		.end = 0xFFC004FF,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_MEM,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_UART0_RX,
 | 
	
		
			
				|  |  | +		.end = IRQ_UART0_RX+1,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = CH_UART0_RX,
 | 
	
		
			
				|  |  | +		.end = CH_UART0_RX+1,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_DMA,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device bfin_sir0_device = {
 | 
	
		
			
				|  |  | +	.name = "bfin_sir",
 | 
	
		
			
				|  |  | +	.id = 0,
 | 
	
		
			
				|  |  | +	.num_resources = ARRAY_SIZE(bfin_sir0_resources),
 | 
	
		
			
				|  |  | +	.resource = bfin_sir0_resources,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
 | 
	
		
			
				|  |  | +#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
 | 
	
		
			
				|  |  | +static struct resource bfin_sport0_uart_resources[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = SPORT0_TCR1,
 | 
	
		
			
				|  |  | +		.end = SPORT0_MRCS3+4,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_MEM,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_SPORT0_RX,
 | 
	
		
			
				|  |  | +		.end = IRQ_SPORT0_RX+1,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_SPORT0_ERROR,
 | 
	
		
			
				|  |  | +		.end = IRQ_SPORT0_ERROR,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static unsigned short bfin_sport0_peripherals[] = {
 | 
	
		
			
				|  |  | +	P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
 | 
	
		
			
				|  |  | +	P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device bfin_sport0_uart_device = {
 | 
	
		
			
				|  |  | +	.name = "bfin-sport-uart",
 | 
	
		
			
				|  |  | +	.id = 0,
 | 
	
		
			
				|  |  | +	.num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
 | 
	
		
			
				|  |  | +	.resource = bfin_sport0_uart_resources,
 | 
	
		
			
				|  |  | +	.dev = {
 | 
	
		
			
				|  |  | +		.platform_data = &bfin_sport0_peripherals, /* Passed to driver */
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
 | 
	
		
			
				|  |  | +static struct resource bfin_sport1_uart_resources[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = SPORT1_TCR1,
 | 
	
		
			
				|  |  | +		.end = SPORT1_MRCS3+4,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_MEM,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_SPORT1_RX,
 | 
	
		
			
				|  |  | +		.end = IRQ_SPORT1_RX+1,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = IRQ_SPORT1_ERROR,
 | 
	
		
			
				|  |  | +		.end = IRQ_SPORT1_ERROR,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static unsigned short bfin_sport1_peripherals[] = {
 | 
	
		
			
				|  |  | +	P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
 | 
	
		
			
				|  |  | +	P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device bfin_sport1_uart_device = {
 | 
	
		
			
				|  |  | +	.name = "bfin-sport-uart",
 | 
	
		
			
				|  |  | +	.id = 1,
 | 
	
		
			
				|  |  | +	.num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
 | 
	
		
			
				|  |  | +	.resource = bfin_sport1_uart_resources,
 | 
	
		
			
				|  |  | +	.dev = {
 | 
	
		
			
				|  |  | +		.platform_data = &bfin_sport1_peripherals, /* Passed to driver */
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 |