Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions linux-4.1/arch/arm/mach-bcm2709/bcm2709.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,29 +524,6 @@ struct platform_device bcm2835_emmc_device = {
};
#endif /* CONFIG_MMC_BCM2835 */


#if defined(CONFIG_BCM2835_RAW_UART) || defined(CONFIG_BCM2835_RAW_UART_MODULE)
static struct resource bcm2835_raw_uart_resources[] = {
{
.start = UART0_BASE,
.end = UART0_BASE + 0x100 - 1, /*HT: ??*/
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_UART, /*TODO: Check*/
.end = IRQ_UART,
.flags = IORESOURCE_IRQ,
}
};

static struct platform_device bcm2709_raw_uart_device = {
.name = "bcm2835-raw-uart",
.id = 0,
.resource = bcm2835_raw_uart_resources,
.num_resources = ARRAY_SIZE(bcm2835_raw_uart_resources),
};
#endif

static struct platform_device bcm2708_alsa_devices[] = {
[0] = {
.name = "bcm2835_AUD0",
Expand Down Expand Up @@ -954,10 +931,6 @@ void __init bcm2709_init(void)
bcm2709_init_led();
bcm2709_init_uart1();

#if defined(CONFIG_BCM2835_RAW_UART) || defined(CONFIG_BCM2835_RAW_UART_MODULE)
bcm_register_device(&bcm2709_raw_uart_device); /*HT*/
#endif /*defined(CONFIG_BCM2835_RAW_UART) || defined(CONFIG_BCM2835_RAW_UART_MODULE)*/

/* Only create the platform devices for the ALSA driver in the
absence of an enabled "audio" DT node */
if (!use_dt ||
Expand Down
45 changes: 37 additions & 8 deletions linux-4.1/drivers/char/broadcom/bcm2835_raw_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,25 @@ static int bcm2835_raw_uart_remove( struct platform_device *pdev )
return -EFAULT;

}
static struct resource bcm2835_raw_uart_resources[] = {
{
.start = UART0_BASE,
.end = UART0_BASE + 0x100 - 1, /*HT: ??*/
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_UART, /*TODO: Check*/
.end = IRQ_UART,
.flags = IORESOURCE_IRQ,
}
};

static struct platform_device bcm2709_raw_uart_device = {
.name = "bcm2835-raw-uart",
.id = 0,
.resource = bcm2835_raw_uart_resources,
.num_resources = ARRAY_SIZE(bcm2835_raw_uart_resources),
};



Expand All @@ -1192,14 +1211,21 @@ static int __init bcm2835_raw_uart_init(void)
{
int ret;

ret = platform_driver_register( &m_bcm2835_raw_uart_driver );
if( ret )
{
printk(KERN_ERR "bcm2835_raw_uart: Failed to register platform driver (%i)\n", ret );
goto out;
}
ret = platform_device_register( &bcm2709_raw_uart_device );
if( ret )
{
printk(KERN_ERR "bcm2835_raw_uart: Failed to register platform driver (%i)\n", ret );
goto out;
}

ret = platform_driver_register( &m_bcm2835_raw_uart_driver );
if( ret )
{
printk(KERN_ERR "bcm2835_raw_uart: Failed to register platform driver (%i)\n", ret );
goto out;
}

return 0;
return 0;

out:
return ret;
Expand All @@ -1214,11 +1240,14 @@ static int __init bcm2835_raw_uart_init(void)
**/
static void __exit bcm2835_raw_uart_exit(void)
{
platform_driver_unregister( &m_bcm2835_raw_uart_driver );
platform_driver_unregister( &m_bcm2835_raw_uart_driver );
platform_device_unregister( &bcm2709_raw_uart_device );
}

module_init( bcm2835_raw_uart_init );
module_exit( bcm2835_raw_uart_exit );
MODULE_DESCRIPTION( "eQ-3 raw BCM2835 uart driver" );
MODULE_LICENSE( "GPL" );
MODULE_AUTHOR( "eQ-3 Entwicklung GmbH" );