OMAP1: UART / Bluetooth Support
PATCH 1/1 OMAP1: UART / Bluetooth Support
This set of changes is specifically geared towards enabling bluetooth support on the HTC Herald. To do that, several things were done:
* I added in the necessary clock and mux configuration to enable both UARTs to operate.
* I modified the omap1 serial code to only initialize two UARTs if the CPU type is omap7xx. These chips don't have 3 UARTs, and trying to initialize the third one causes deadlock.
* I created a common bluetooth-handling driver for HTC smartphones like the herald. This will be used later by other similar boards, such as the wizard and the opal. The driver itself only implements an RFKILL switch to enable/disable the GPIO pins that control the bluetooth on these devices.
* I added the new bluetooth driver and serial port init code to the herald board.
* Finally, I updated the htcherald_defconfig both to add in bluetooth support, and to remove old unneeded cruft.
The on-board chip is a TI BRF6150 attached to the first UART. Rather than write (or port) a driver for this chip, this method was chosen because bluez supports the chip over a UART with hciattach. So, rather than implement a full brf6150 driver, I expose and configure the serial port it's attached to.
Cory Maccarrone (3):
[omap1] omap7xx clocks, mux, serial fixes [omap1] Bluetooth device code common to HTC smartphones [htcherald] Add board support for UARTs, bluetooth
arch/arm/configs/htcherald_defconfig | 159 ++++++++----------------- arch/arm/mach-omap1/Makefile | 2 +- arch/arm/mach-omap1/board-htcherald.c | 23 ++++ arch/arm/mach-omap1/clock_data.c | 20 +++ arch/arm/mach-omap1/htc-bt.c | 183 +++++++++++++++++++++++++++++ arch/arm/mach-omap1/include/mach/htc-bt.h | 22 ++++ arch/arm/mach-omap1/mux.c | 4 + arch/arm/mach-omap1/serial.c | 7 + arch/arm/plat-omap/include/plat/mux.h | 4 + 9 files changed, 315 insertions(+), 109 deletions(-) create mode 100644 arch/arm/mach-omap1/htc-bt.c create mode 100644 arch/arm/mach-omap1/include/mach/htc-bt.h
PATCH 1/1 omap7xx clocks, mux, serial fixes
This change adds in the necessary clocks and mux pins for UART control on omap7xx devices. I also made a change in the serial code to only try and initialize two UARTs in omap_serial_init, as these devices don't have three.
--- arch/arm/mach-omap1/clock_data.c | 20 ++++++++++++++++++++ arch/arm/mach-omap1/mux.c | 4 ++++ arch/arm/mach-omap1/serial.c | 7 +++++++ arch/arm/plat-omap/include/plat/mux.h | 4 ++++ 4 files changed, 35 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/clock_data.c +20 -0
@@ -478,6 +478,24 @@ static struct clk usb_dc_ck7xx = { .enable_bit = 8, }; +static struct clk uart1_7xx = { + .name ="uart1_ck" , + .ops = &clkops_generic, +/* Direct from ULPD, no parent */ + .rate =12000000 , + .enable_reg =OMAP1_IO_ADDRESS (SOFT_REQ_REG ), + .enable_bit =9 , +}; + +static struct clk uart2_7xx = { + .name ="uart2_ck" , + .ops = &clkops_generic, +/* Direct from ULPD, no parent */ + .rate =12000000 , + .enable_reg =OMAP1_IO_ADDRESS (SOFT_REQ_REG ), + .enable_bit =11 , +}; +static struct clk mclk_1510 = { .name ="mclk" , .ops = &clkops_generic,
@@ -620,7 +638,9 @@ static struct omap_clk omap_clks[] = {/* ULPD clocks */ CLK (NULL ,"uart1_ck" , &uart1_1510,CK_1510 |CK_310 ),CLK (NULL ,"uart1_ck" , &uart1_16xx.clk,CK_16XX ), +CLK (NULL ,"uart1_ck" , &uart1_7xx,CK_7XX ),CLK (NULL ,"uart2_ck" , &uart2_ck,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"uart2_ck" , &uart2_7xx,CK_7XX ),CLK (NULL ,"uart3_ck" , &uart3_1510,CK_1510 |CK_310 ),CLK (NULL ,"uart3_ck" , &uart3_16xx.clk,CK_16XX ), CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310),
arch/arm/mach-omap1/mux.c +4 -0
@@ -70,6 +70,10 @@ MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0)MUX_CFG_7XX ("SPI_7XX_6" ,9 ,5 ,0 ,4 ,0 ,0 ) + +/* UART pins */ +MUX_CFG_7XX("UART_7XX_1", 3, 21, 0, 20, 0, 0) +MUX_CFG_7XX ("UART_7XX_2" ,8 ,1 ,6 ,0 ,0 ,0 ) };#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)#else
arch/arm/mach-omap1/serial.c +7 -0
@@ -122,6 +122,13 @@ void __init omap_serial_init(void)for (i =0 ; i <ARRAY_SIZE (serial_platform_data) -1 ; i++) { +/* Don't look at UARTs higher than 2 for omap7xx */ +if (cpu_is_omap7xx () && i >1 ) { + serial_platform_data[i].membase =NULL ; + serial_platform_data[i].mapbase =0 ; +continue ; + } +/* Static mapping, never released */ serial_platform_data[i].membase =ioremap (serial_platform_data[i].mapbase,SZ_2K );
arch/arm/plat-omap/include/plat/mux.h +4 -0
@@ -191,6 +191,10 @@ enum omap7xx_index {SPI_7XX_4 ,SPI_7XX_5 ,SPI_7XX_6 , + +/* UART */ +UART_7XX_1 , + UART_7XX_2, }; enum omap1xxx_index {
Signature · 1 line
1.6.0.4
Tony Lindgren
reviewerRe: [PATCH] [omap1] omap7xx clocks, mux, serial fixes
Quoted 4 lines · Cory Maccarrone
This change adds in the necessary clocks and mux pins for UART control on omap7xx devices. I also made a change in the serial code to only try and initialize two UARTs in
omap_serial_init, as these devices don't have three.
Was about to queue this one and then noticed you might want to update this according to Paul's recent patch "OMAP1: clock: some cleanup" for the enable_bit?
Regards,
Tony
Quoted 102 lines
Signed-off-by Cory Maccarrone <[email protected]>--- arch/arm/mach-omap1/clock_data.c | 20 ++++++++++++++++++++ arch/arm/mach-omap1/mux.c | 4 ++++ arch/arm/mach-omap1/serial.c | 7 +++++++ arch/arm/plat-omap/include/plat/mux.h | 4 ++++ 4 files changed, 35 insertions(+), 0 deletions(-)arch/arm/mach-omap1/clock_data.c +20
-0@@ -478,6 +478,24 @@ static struct clk usb_dc_ck7xx = { .enable_bit = 8, }; +static struct clk uart1_7xx = { + .name ="uart1_ck" , + .ops = &clkops_generic, +/* Direct from ULPD, no parent */ + .rate =12000000 , + .enable_reg =OMAP1_IO_ADDRESS (SOFT_REQ_REG ), + .enable_bit =9 , +}; + +static struct clk uart2_7xx = { + .name ="uart2_ck" , + .ops = &clkops_generic, +/* Direct from ULPD, no parent */ + .rate =12000000 , + .enable_reg =OMAP1_IO_ADDRESS (SOFT_REQ_REG ), + .enable_bit =11 , +}; +static struct clk mclk_1510 = { .name ="mclk" , .ops = &clkops_generic,@@ -620,7 +638,9 @@ static struct omap_clk omap_clks[] = {/* ULPD clocks */ CLK (NULL ,"uart1_ck" , &uart1_1510,CK_1510 |CK_310 ),CLK (NULL ,"uart1_ck" , &uart1_16xx.clk,CK_16XX ), +CLK (NULL ,"uart1_ck" , &uart1_7xx,CK_7XX ),CLK (NULL ,"uart2_ck" , &uart2_ck,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"uart2_ck" , &uart2_7xx,CK_7XX ),CLK (NULL ,"uart3_ck" , &uart3_1510,CK_1510 |CK_310 ),CLK (NULL ,"uart3_ck" , &uart3_16xx.clk,CK_16XX ), CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310),arch/arm/mach-omap1/mux.c +4
-0@@ -70,6 +70,10 @@ MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0)MUX_CFG_7XX ("SPI_7XX_6" ,9 ,5 ,0 ,4 ,0 ,0 ) + +/* UART pins */ +MUX_CFG_7XX("UART_7XX_1", 3, 21, 0, 20, 0, 0) +MUX_CFG_7XX ("UART_7XX_2" ,8 ,1 ,6 ,0 ,0 ,0 ) };#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)#else arch/arm/mach-omap1/serial.c +7
-0@@ -122,6 +122,13 @@ void __init omap_serial_init(void)for (i =0 ; i <ARRAY_SIZE (serial_platform_data) -1 ; i++) { +/* Don't look at UARTs higher than 2 for omap7xx */ +if (cpu_is_omap7xx () && i >1 ) { + serial_platform_data[i].membase =NULL ; + serial_platform_data[i].mapbase =0 ; +continue ; + } +/* Static mapping, never released */ serial_platform_data[i].membase =ioremap (serial_platform_data[i].mapbase,SZ_2K );arch/arm/plat-omap/include/plat/mux.h +4
-0@@ -191,6 +191,10 @@ enum omap7xx_index {SPI_7XX_4 ,SPI_7XX_5 ,SPI_7XX_6 , + +/* UART */ +UART_7XX_1 , + UART_7XX_2, }; enum omap1xxx_index {Signature · 6 lines
1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Tony Lindgren
reviewerRe: [PATCH] [omap1] omap7xx clocks, mux, serial fixes
Quoted 9 lines · Tony Lindgren
Quoted 4 lines · Cory Maccarrone
This change adds in the necessary clocks and mux pins for UART control on omap7xx devices. I also made a change in the serial code to only try and initialize two UARTs in
omap_serial_init, as these devices don't have three.Was about to queue this one and then noticed you might want to update this according to Paul's recent patch "OMAP1: clock: some cleanup" for the
enable_bit?
Hmm, I guess you don't have documentation for the bits.. I'll queue this one, the bits can be patched later. Looks like the other patches need updating though to apply.
Regards,
Tony
PATCH 1/1 Bluetooth device code common to HTC smartphones
In reply to Cory MaccarroneThis change adds in a bluetooth controld driver/rfkill interface to the serial bluetooth controller found on many HTC smartphones such as the HTC Herald and HTC Wizard.
--- arch/arm/mach-omap1/htc-bt.c | 183 +++++++++++++++++++++++++++++ arch/arm/mach-omap1/include/mach/htc-bt.h | 22 ++++ 2 files changed, 205 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap1/htc-bt.c create mode 100644 arch/arm/mach-omap1/include/mach/htc-bt.h
arch/arm/mach-omap1/htc-bt.c new file +183 -0
@@ -0,0 +1,183 @@ +/* +* Bluetooth built-in chip control +* +* Copyright (c) 2010 Cory Maccarrone +* Based on tosa-bt.c copyright (c) 2008 Dmitry Baryshkov +* +* 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. +* +*/ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/gpio.h> +#include <linux/delay.h> +#include <linux/rfkill.h> +#include <linux/clk.h> + +#include <plat/mux.h> + +#include <mach/htc-bt.h> + +static struct clk *uart_ck; + +static void htc_bt_on (struct htc_bt_data *data) +{ +gpio_set_value (data->gpio_pwr,1 ); + +if (uart_ck) +clk_enable (uart_ck); + +mdelay (1000 ); + +if (data->gpio_enable) +gpio_set_value (data->gpio_enable,1 ); +} + +static void htc_bt_off (struct htc_bt_data *data) +{ +gpio_set_value (data->gpio_pwr,0 ); + +if (uart_ck) +clk_disable (uart_ck); + +mdelay (1000 ); + +if (data->gpio_enable) +gpio_set_value (data->gpio_enable,0 ); +} + +static int htc_bt_set_block (void *data,bool blocked) +{ +if (!blocked) +htc_bt_on (data); +else +htc_bt_off (data); + +return 0 ; +} + +static const struct rfkill_ops htc_bt_rfkill_ops = { + .set_block = htc_bt_set_block, +}; + +static int htc_bt_probe (struct platform_device *dev) +{ +int rc; +struct rfkill *rfk; + +struct htc_bt_data *data = dev->dev.platform_data; + +/* Configure the GPIOs */ +if (data->gpio_enable) { + rc =gpio_request (data->gpio_enable,"Bluetooth enable" ); +if (rc) + goto err_enable; + rc =gpio_direction_output (data->gpio_enable,0 ); +if (rc) + goto err_enable_dir; + } + + rc =gpio_request (data->gpio_pwr,"Bluetooth power" ); +if (rc) + goto err_pwr; + rc =gpio_direction_output (data->gpio_pwr,0 ); +if (rc) + goto err_pwr_dir; + +/* Get the clocks */ +if (data->uart_clock !=NULL ) { + uart_ck =clk_get (NULL , data->uart_clock); +if (IS_ERR (uart_ck)) { +pr_warn ("htc-bt: Could not get uart clock\n" ); + uart_ck =NULL ; + }else +clk_disable (uart_ck); + }else + uart_ck =NULL ; + +/* MUX pins for UART */ +omap_cfg_reg (UART_7XX_1 ); +omap_cfg_reg (UART_7XX_2 ); + +/* Configure RFKill */ + rfk =rfkill_alloc ("htc-bt" , &dev->dev,RFKILL_TYPE_BLUETOOTH , + &htc_bt_rfkill_ops, data); +if (!rfk) { + rc = -ENOMEM ; + goto err_rfk_alloc; + } + +rfkill_set_led_trigger_name (rfk,"htc-bt" ); + + rc =rfkill_register (rfk); +if (rc) + goto err_rfkill; + +platform_set_drvdata (dev, rfk); + +return 0 ; + +err_rfkill: +rfkill_destroy (rfk); +err_rfk_alloc: +htc_bt_off (data); +err_pwr_dir: +gpio_free (data->gpio_pwr); +err_pwr: +err_enable_dir: +if (data->gpio_enable) +gpio_free (data->gpio_enable); +err_enable: +return rc; +} + +static int __devexit htc_bt_remove(struct platform_device *dev) +{ +struct htc_bt_data *data = dev->dev.platform_data; +struct rfkill *rfk =platform_get_drvdata (dev); + +platform_set_drvdata (dev,NULL ); + +if (rfk) { +rfkill_unregister (rfk); +rfkill_destroy (rfk); + } + rfk =NULL ; + +htc_bt_off (data); + +gpio_free (data->gpio_pwr); +if (data->gpio_enable) +gpio_free (data->gpio_enable); + +return 0 ; +} + +static struct platform_driver htc_bt_driver = { + .probe = htc_bt_probe, + .remove =__devexit_p (htc_bt_remove), + + .driver = { + .name ="htc-bt" , + .owner =THIS_MODULE , + }, +}; + + +static int __init htc_bt_init (void ) +{ +return platform_driver_register (&htc_bt_driver); +} + +static void __exit htc_bt_exit(void) +{ +platform_driver_unregister (&htc_bt_driver); +} + +late_initcall (htc_bt_init); +module_exit (htc_bt_exit); +
arch/arm/mach-omap1/include/mach/htc-bt.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* HTC bluetooth built-in chip control. +* +* Copyright (C) 2010 Cory Maccarrone +* Based on tosa_bt.h copyright (c) 2008 Dmitry Baryshkov +* +* 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 HTC_BT_H +#define HTC_BT_H + +struct htc_bt_data { +const char *uart_clock; +int gpio_pwr; +int gpio_enable; +}; + +#endif +
Signature · 1 line
1.6.0.4
Tony Lindgren
reviewerRe: [PATCH] [omap1] Bluetooth device code common to HTC smartphones
Quoted 3 lines · Cory Maccarrone
This change adds in a bluetooth controld driver/rfkill interface to the serial bluetooth controller found on many HTC smartphones such as the HTC Herald and HTC Wizard.
<snip>
arch/arm/mach-omap1/htc-bt.c line 38
Quoted 12 lines
arch/arm/mach-omap1/htc-bt.c new file +12
-0+static void htc_bt_on (struct htc_bt_data *data) +{ +gpio_set_value (data->gpio_pwr,1 ); + +if (uart_ck) +clk_enable (uart_ck); + +mdelay (1000 ); + +if (data->gpio_enable) +gpio_set_value (data->gpio_enable,1 ); +}
Maybe you can use msleep here instead? Otherwise the whole system will hang for a second..
arch/arm/mach-omap1/htc-bt.c line 51
Quoted 12 lines
arch/arm/mach-omap1/htc-bt.c new file +12
-0+static void htc_bt_off (struct htc_bt_data *data) +{ +gpio_set_value (data->gpio_pwr,0 ); + +if (uart_ck) +clk_disable (uart_ck); + +mdelay (1000 ); + +if (data->gpio_enable) +gpio_set_value (data->gpio_enable,0 ); +}
Here too.
Regards,
Tony
PATCH 1/1 Add board support for UARTs, bluetooth
In reply to Cory MaccarroneThis change adds bluetooth and UART initialization support to the HTC Herald board driver. This allows use of the serial bluetooth adapter attached to UART1 using hciattach.
The defconfig was updated to add in bluetooth core support, as well as to clean up some unneeded cruft.
--- arch/arm/configs/htcherald_defconfig | 159 +++++++++++---------------------- arch/arm/mach-omap1/Makefile | 2 +- arch/arm/mach-omap1/board-htcherald.c | 23 +++++ 3 files changed, 75 insertions(+), 109 deletions(-)
arch/arm/configs/htcherald_defconfig +51 -108
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.34 -# Sun May 30 15:54:07 2010 +# Tue Jun 1 14:47:13 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -255,11 +255,11 @@ CONFIG_ARCH_OMAP1=y CONFIG_OMAP_MUX=y # CONFIG_OMAP_MUX_DEBUG is not set CONFIG_OMAP_MUX_WARNINGS=y -CONFIG_OMAP_MCBSP=y +# CONFIG_OMAP_MCBSP is not set # CONFIG_OMAP_MBOX_FWK is not set CONFIG_OMAP_MPU_TIMER=y # CONFIG_OMAP_32K_TIMER is not set -CONFIG_OMAP_SERIAL_WAKE=y +# CONFIG_OMAP_SERIAL_WAKE is not set # CONFIG_OMAP_PM_NONE is not set CONFIG_OMAP_PM_NOOP=y
@@ -338,7 +338,7 @@ CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_PREEMPT=y CONFIG_HZ=100 CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y +# CONFIG_OABI_COMPAT is not set CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
@@ -356,7 +356,7 @@ CONFIG_ZONE_DMA_FLAG=0 CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_LEDS=y +# CONFIG_LEDS is not set CONFIG_ALIGNMENT_TRAP=y # CONFIG_UACCESS_WITH_MEMCPY is not set
@@ -383,9 +383,6 @@ CONFIG_CMDLINE="mem=32M console=ttyS0,115200 ip=dhcp" # # At least one emulation must be selected # -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set # CONFIG_VFP is not set #
@@ -482,21 +479,33 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set # CONFIG_IRDA is not set -# CONFIG_BT is not set +CONFIG_BT=y +CONFIG_BT_L2CAP=y +# CONFIG_BT_L2CAP_EXT_FEATURES is not set +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTSDIO is not set +CONFIG_BT_HCIUART=y +# CONFIG_BT_HCIUART_H4 is not set +# CONFIG_BT_HCIUART_BCSP is not set +CONFIG_BT_HCIUART_LL=y +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set # CONFIG_AF_RXRPC is not set -CONFIG_WIRELESS=y -# CONFIG_CFG80211 is not set -# CONFIG_LIB80211 is not set - -# -# CFG80211 needs to be enabled for MAC80211 -# - -# -# Some wireless drivers require a rate control algorithm -# +# CONFIG_WIRELESS is not set # CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y # CONFIG_NET_9P is not set # CONFIG_CAIF is not set
@@ -527,32 +536,11 @@ CONFIG_BLK_DEV_LOOP=y # DRBD disabled because PROC_FS, INET or CONNECTOR not selected # # CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_XIP is not set +# CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_MG_DISK is not set -CONFIG_MISC_DEVICES=y -# CONFIG_AD525X_DPOT is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_ISL29003 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_IWMC3200TOP is not set +# CONFIG_MISC_DEVICES is not set CONFIG_HAVE_IDE=y # CONFIG_IDE is not set
@@ -573,32 +561,10 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_VETH is not set -# CONFIG_PHYLIB is not set -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_AX88796 is not set -CONFIG_SMC91X=y -# CONFIG_DM9000 is not set -# CONFIG_ENC28J60 is not set -# CONFIG_ETHOC is not set -# CONFIG_SMC911X is not set -# CONFIG_SMSC911X is not set -# CONFIG_DNET is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set -# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set -# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set -# CONFIG_B44 is not set -# CONFIG_KS8842 is not set -# CONFIG_KS8851 is not set -# CONFIG_KS8851_MLL is not set -CONFIG_NETDEV_1000=y -CONFIG_NETDEV_10000=y -CONFIG_WLAN=y -# CONFIG_HOSTAP is not set +# CONFIG_NET_ETHERNET is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -703,16 +669,17 @@ CONFIG_DEVKMEM=y # # Serial drivers # -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_CONSOLE is not set +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set # # Non-8250 serial port support # # CONFIG_SERIAL_MAX3100 is not set -CONFIG_SERIAL_CORE=m +CONFIG_SERIAL_CORE=y # CONFIG_SERIAL_TIMBERDALE is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set
@@ -748,7 +715,7 @@ CONFIG_I2C_ALGOBIT=y # I2C system bus drivers (mostly embedded / system-on-chip) # # CONFIG_I2C_DESIGNWARE is not set -CONFIG_I2C_GPIO=y +# CONFIG_I2C_GPIO is not set # CONFIG_I2C_OCORES is not set CONFIG_I2C_OMAP=y # CONFIG_I2C_SIMTEC is not set
@@ -945,7 +912,7 @@ CONFIG_HTC_I2CPLD=y # Graphics support # # CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set
@@ -981,10 +948,7 @@ CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2 # CONFIG_FB_OMAP_DMA_TUNE is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_BACKLIGHT_OMAP1 is not set -# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set # # Display device support
@@ -1020,6 +984,9 @@ CONFIG_HID=y # # Special HID drivers # +CONFIG_HID_APPLE=y +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_WACOM is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1207,14 +1174,8 @@ CONFIG_RTC_INTF_DEV=y CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT3_FS is not set # CONFIG_EXT4_FS is not set -CONFIG_JBD=y -CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set
@@ -1265,25 +1226,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set +# CONFIG_MISC_FILESYSTEMS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set
@@ -1477,7 +1420,7 @@ CONFIG_CRYPTO_LZO=y # Random Number Generation # # CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_HW=y +# CONFIG_CRYPTO_HW is not set # CONFIG_BINARY_PRINTF is not set #
@@ -1486,7 +1429,7 @@ CONFIG_CRYPTO_HW=y CONFIG_BITREVERSE=y CONFIG_GENERIC_FIND_LAST_BIT=y # CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set +CONFIG_CRC16=y # CONFIG_CRC_T10DIF is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y
arch/arm/mach-omap1/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o obj-$(CONFIG_AMS_DELTA_FIQ) += ams-delta-fiq.o ams-delta-fiq-handler.o obj-$(CONFIG_MACH_SX1) += board-sx1.o board-sx1-mmc.o -obj-$(CONFIG_MACH_HERALD) += board-htcherald.o +obj-$(CONFIG_MACH_HERALD) += board-htcherald.o htc-bt.o ifeq ($(CONFIG_ARCH_OMAP15XX),y) # Innovator-1510 FPGA
arch/arm/mach-omap1/board-htcherald.c +23 -0
@@ -47,8 +47,10 @@#include <plat/keypad.h> #include <plat/usb.h> #include <plat/mmc.h> +#include <plat/mux.h> #include <mach/irqs.h> +#include <mach/htc-bt.h> #include <linux/delay.h>
@@ -138,6 +140,7 @@ Happy Times 0 1 0 x x x 0 x#define HTCPLD_GPIO_LED_DPAD HTCPLD_BASE(0, 0)#define HTCPLD_GPIO_LED_KBD HTCPLD_BASE(1, 0) +#define HTCPLD_GPIO_BT_POWER HTCPLD_BASE(1, 4)#define HTCPLD_GPIO_LED_CAPS HTCPLD_BASE(1, 5)#define HTCPLD_GPIO_LED_RED_FLASH HTCPLD_BASE(2, 1)#define HTCPLD_GPIO_LED_RED_SOLID HTCPLD_BASE(2, 2)
@@ -423,6 +426,22 @@ static struct omap_mmc_platform_data htc_mmc1_data = {static struct omap_mmc_platform_data *htc_mmc_data[1 ];#endif +/* Bluetooth */ +#define HTCHERALD_GPIO_BT_ENABLE 125 + +static struct htc_bt_data htcherald_bt_data = { + .uart_clock ="uart1_ck" , + .gpio_pwr =HTCPLD_GPIO_BT_POWER , + .gpio_enable =HTCHERALD_GPIO_BT_ENABLE , +}; + +static struct platform_device bt_device = { + .name ="htc-bt" , + .id =-1 , + .dev = { + .platform_data = &htcherald_bt_data, + }, +};/* Platform devices for the Herald */ static struct platform_device *devices[]__initdata = {
@@ -431,6 +450,7 @@ static struct platform_device *devices[] __initdata = { &htcpld_device, &gpio_leds_device, &herald_gpiokeys_device, + &bt_device, };/*
@@ -574,6 +594,7 @@ done:printk (KERN_INFO "USB setup complete.\n" ); } +static void __init htcherald_init (void ) {printk (KERN_INFO "HTC Herald init.\n" );
@@ -595,6 +616,8 @@ static void __init htcherald_init(void)omap_register_i2c_bus (1 ,100 ,NULL ,0 ); +omap_serial_init (); +#if defined(CONFIG_MMC_OMAP ) || defined(CONFIG_MMC_OMAP_MODULE ) htc_mmc_data[0 ] = &htc_mmc1_data;omap1_init_mmc (htc_mmc_data,1 );
Signature · 1 line
1.6.0.4
Tony Lindgren
reviewerRe: [PATCH] [htcherald] Add board support for UARTs, bluetooth
Quoted 6 lines · Cory Maccarrone
This change adds bluetooth and UART initialization support to the HTC Herald board driver. This allows use of the serial bluetooth adapter attached to UART1 using hciattach.
The defconfig was updated to add in bluetooth core support, as well as to clean up some unneeded cruft.
This one needs to be updated to leave out the defconfig changes as we won't be patching those any longer.
Regards,
Tony