Skip to content
Browse files

2.0 patchset applied to omap-2.6.31 brach

  • Loading branch information...
1 parent 8e82dfe commit 493bd274661442824532ae6bada77af1dc644077 Matt Isaacs committed
View
2 arch/arm/Kconfig
@@ -1477,6 +1477,8 @@ source "drivers/uio/Kconfig"
source "drivers/staging/Kconfig"
+source "drivers/bmi/Kconfig"
+
if ARCH_OMAP
source "drivers/cbus/Kconfig"
endif
View
4 arch/arm/mach-omap2/Kconfig
@@ -65,6 +65,10 @@ config MACH_OMAP3EVM
bool "OMAP 3530 EVM board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
+config MACH_OMAP3BUG
+ bool "OMAP 3530 BUGBASE board"
+ depends on ARCH_OMAP3 && ARCH_OMAP34XX
+
config MACH_OMAP3_PANDORA
bool "OMAP3 Pandora"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
View
4 arch/arm/mach-omap2/Makefile
@@ -63,6 +63,10 @@ obj-$(CONFIG_MACH_OVERO) += board-overo.o \
mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \
mmc-twl4030.o
+obj-$(CONFIG_MACH_OMAP3BUG) += board-omap3bug.o \
+ mmc-twl4030.o \
+ board-omap3bug-flash.o \
+ twl4030-generic-scripts.o
obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
View
38 arch/arm/mach-omap2/board-omap3beagle.c
@@ -162,7 +162,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -339,6 +339,41 @@ static struct platform_device keys_gpio = {
},
};
+static struct resource bmi_slot1_resources[] = {
+ [0] = {
+ .start = 161,
+ .flags = IORESOURCE_IRQ,
+ },
+ [1] = {
+ .start = 134,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device bmi_slot_devices[] = {
+ {
+ .name = "omap_bmi_slot",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(bmi_slot1_resources),
+ .resource = bmi_slot1_resources,
+ },
+};
+
+
+static void omap_init_bmi_slots(void)
+{
+ int i;
+
+ gpio_direction_output(156, false);
+ gpio_direction_output(159, false);
+
+ for (i = 0; i < ARRAY_SIZE(bmi_slot_devices); i++) {
+ if (platform_device_register(&bmi_slot_devices[i]) < 0)
+ dev_err(&bmi_slot_devices[i].dev,
+ "Unable to register BMI slot\n");
+ }
+}
+
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
{ OMAP_TAG_LCD, &omap3_beagle_lcd_config },
};
@@ -428,6 +463,7 @@ static void __init omap3_beagle_init(void)
usb_musb_init();
usb_ehci_init(&ehci_pdata);
omap3beagle_flash_init();
+ omap_init_bmi_slots();
/* Ensure SDRC pins are mux'd for self-refresh */
omap_cfg_reg(H16_34XX_SDRC_CKE0);
View
38 arch/arm/mach-omap2/mmc-twl4030.c
@@ -60,7 +60,9 @@ static int twl_mmc_card_detect(int irq)
continue;
if (irq != mmc->slots[0].card_detect_irq)
continue;
-
+
+ if (i == 2)
+ return 1;
/* NOTE: assumes card detect signal is active-low */
return !gpio_get_value_cansleep(mmc->slots[0].switch_pin);
}
@@ -95,8 +97,9 @@ static int twl_mmc_late_init(struct device *dev)
/* MMC/SD/SDIO doesn't require a card detect switch */
if (gpio_is_valid(mmc->slots[0].switch_pin)) {
ret = gpio_request(mmc->slots[0].switch_pin, "mmc_cd");
- if (ret)
+ if (ret)
goto done;
+
ret = gpio_direction_input(mmc->slots[0].switch_pin);
if (ret)
goto err;
@@ -158,7 +161,7 @@ static int twl_mmc_late_init(struct device *dev)
done:
mmc->slots[0].card_detect_irq = 0;
mmc->slots[0].card_detect = NULL;
-
+ ret = 0; /*MI*/
dev_err(dev, "err %d configuring card detect\n", ret);
return ret;
}
@@ -266,7 +269,7 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
return ret;
}
-static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int vdd)
+static int twl_mmc2_set_power(struct device *dev, int slot, int power_on, int vdd)
{
int ret = 0;
struct twl_mmc_controller *c = NULL;
@@ -286,8 +289,19 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
/* If we don't see a Vcc regulator, assume it's a fixed
* voltage always-on regulator.
*/
- if (!c->vcc)
- return 0;
+ if (!c->vcc) {
+ if (power_on) {
+ /* only MMC2 supports a CLKIN */
+ if (mmc->slots[0].internal_clock) {
+ u32 reg;
+
+ reg = omap_ctrl_readl(control_devconf1_offset);
+ reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+ omap_ctrl_writel(reg, control_devconf1_offset);
+ }
+ }
+ return 0;
+ }
/*
* Assume Vcc regulator is used only to power the card ... OMAP
@@ -328,6 +342,13 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
return ret;
}
+static int twl_mmc3_set_power(struct device *dev, int slot, int power_on, int vdd)
+{
+ /* MMC3 power is taken care */
+ return 0;
+}
+
+
static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
@@ -418,10 +439,11 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
c->transceiver = 1;
if (c->transceiver && c->wires > 4)
c->wires = 4;
- /* FALLTHROUGH */
+ mmc->slots[0].set_power = twl_mmc2_set_power;
+ break;
case 3:
/* off-chip level shifting, or none */
- mmc->slots[0].set_power = twl_mmc23_set_power;
+ mmc->slots[0].set_power = twl_mmc3_set_power;
break;
default:
pr_err("MMC%d configuration not supported!\n", c->mmc);
View
2 arch/arm/plat-omap/gpio.c
@@ -1044,7 +1044,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
static void _reset_gpio(struct gpio_bank *bank, int gpio)
{
- _set_gpio_direction(bank, get_gpio_index(gpio), 1);
+ // _set_gpio_direction(bank, get_gpio_index(gpio), 1);
_set_gpio_irqenable(bank, gpio, 0);
_clear_gpio_irqstatus(bank, gpio);
_set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE);
View
3 arch/arm/plat-omap/include/mach/cpu.h
@@ -417,8 +417,11 @@ IS_OMAP_TYPE(3430, 0x3430)
#define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \
CHIP_IS_OMAP3430ES3_0 | \
CHIP_IS_OMAP3430ES3_1)
+
#define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1)
+#define CHIP_GE_OMAP3430ES3 (CHIP_IS_OMAP3430ES3_0 | \
+ CHIP_GE_OMAP3430ES3_1)
int omap_chip_is(struct omap_chip_id oci);
void omap2_check_revision(void);
View
1 drivers/Makefile
@@ -97,6 +97,7 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle/
obj-y += idle/
obj-$(CONFIG_MMC) += mmc/
obj-$(CONFIG_MEMSTICK) += memstick/
+obj-$(CONFIG_BMI) += bmi/
obj-$(CONFIG_NEW_LEDS) += leds/
obj-$(CONFIG_INFINIBAND) += infiniband/
obj-$(CONFIG_SGI_SN) += sn/
View
6 drivers/gpio/Kconfig
@@ -188,4 +188,10 @@ config GPIO_MCP23S08
SPI driver for Microchip MCP23S08 I/O expander. This provides
a GPIO interface supporting inputs and outputs.
+config GPIO_SC16IS7X
+ tristate "NXP SC16IS7X I/O expander"
+ depends on SPI_MASTER
+ help
+ SPI driver for Microchip MCP23S08 I/O expander. This provides
+ a GPIO interface supporting inputs and outputs.
endif
View
1 drivers/gpio/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_GPIO_MCP23S08) += mcp23s08.o
obj-$(CONFIG_GPIO_PCA953X) += pca953x.o
obj-$(CONFIG_GPIO_PCF857X) += pcf857x.o
obj-$(CONFIG_GPIO_PL061) += pl061.o
+obj-$(CONFIG_GPIO_SC16IS7X) += sc16is7x.o
obj-$(CONFIG_GPIO_TWL4030) += twl4030-gpio.o
obj-$(CONFIG_GPIO_XILINX) += xilinx_gpio.o
obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o
View
12 drivers/i2c/busses/Kconfig
@@ -66,6 +66,18 @@ config I2C_AMD756_S4882
This driver can also be built as a module. If so, the module
will be called i2c-amd756-s4882.
+config I2C_PCA954X
+ tristate "PCA954x I2C switches/multiplexers"
+ depends on I2C
+ help
+ Enabling this option will add support for Philips/NXP I2C switches
+ an multiplexers. The I2C is multiplexed over up to 8 different
+ channels, where the I2C clients live. Saying yes here will give
+ you access to these in addition to the trunk.
+
+ This driver can also be built as a module. If so, the module
+ will be called i2c-pca945x.
+
config I2C_AMD8111
tristate "AMD 8111"
depends on PCI
View
1 drivers/i2c/busses/Makefile
@@ -66,6 +66,7 @@ obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o
obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o
obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o
+obj-$(CONFIG_I2C_PCA954X) += i2c-pca954x.o
obj-$(CONFIG_I2C_PMCMSP) += i2c-pmcmsp.o
obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o
obj-$(CONFIG_I2C_STUB) += i2c-stub.o
View
7 drivers/mmc/core/core.c
@@ -890,9 +890,10 @@ void mmc_rescan(struct work_struct *work)
mmc_claim_host(host);
mmc_power_up(host);
- mmc_go_idle(host);
-
- mmc_send_if_cond(host, host->ocr_avail);
+ err = mmc_go_idle(host);
+ printk(KERN_INFO "mmc_core: send_go_idle return %d\n",err);
+ err = mmc_send_if_cond(host, host->ocr_avail);
+ printk(KERN_INFO "mmc_core: send_if_cond return %d\n",err);
/*
* First we search for SDIO...
View
6 drivers/mmc/host/omap_hsmmc.c
@@ -852,9 +852,9 @@ static void omap_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
OMAP_HSMMC_READ(host->base, HCTL) | FOUR_BIT);
break;
case MMC_BUS_WIDTH_1:
- OMAP_HSMMC_WRITE(host->base, CON, con & ~DW8);
- OMAP_HSMMC_WRITE(host->base, HCTL,
- OMAP_HSMMC_READ(host->base, HCTL) & ~FOUR_BIT);
+ OMAP_HSMMC_WRITE(host->base, CON, (con & ~DW8) | (1<<11));
+ OMAP_HSMMC_WRITE(host->base, HCTL,
+ (OMAP_HSMMC_READ(host->base, HCTL) & ~FOUR_BIT) | (1 << 24));
break;
}
View
23 drivers/usb/host/ehci-omap.c
@@ -235,6 +235,7 @@ static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
*/
static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
{
+ struct omap_chip_id oci = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3);
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
u8 tll_ch_mask = 0;
unsigned reg = 0;
@@ -290,12 +291,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
if (omap->phy_reset) {
/* Refer: ISSUE1 */
if (gpio_is_valid(omap->reset_gpio_port[0])) {
+ printk(KERN_INFO "omap-ehci: USB1 PHY reset valid..\n");
gpio_request(omap->reset_gpio_port[0],
"USB1 PHY reset");
gpio_direction_output(omap->reset_gpio_port[0], 0);
}
if (gpio_is_valid(omap->reset_gpio_port[1])) {
+ printk(KERN_INFO "omap-ehci: USB2 PHY reset valid..\n");
gpio_request(omap->reset_gpio_port[1],
"USB2 PHY reset");
gpio_direction_output(omap->reset_gpio_port[1], 0);
@@ -364,16 +367,8 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
/* Bypass the TLL module for PHY mode operation */
- if (omap_rev() <= OMAP3430_REV_ES2_1) {
- dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1 \n");
- if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) ||
- (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) ||
- (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY))
- reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
- else
- reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
- } else {
- dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
+ if (omap_chip_is(oci)) {
+ dev_dbg(omap->dev, "OMAP3 ES version > ES3\n");
if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY)
reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
else if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL)
@@ -389,6 +384,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
else if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)
reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
+ } else {
+ dev_dbg(omap->dev, "OMAP3 ES version < ES3\n");
+ if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) ||
+ (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) ||
+ (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY))
+ reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+ else
+ reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
}
ehci_omap_writel(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
dev_dbg(omap->dev, "UHH setup done, uhh_base=%x\n", reg);
View
13 include/linux/mod_devicetable.h
@@ -343,6 +343,19 @@ struct eisa_device_id {
#define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
+/* Bug Labs BeagleBug */
+
+struct bmi_device_id {
+ __u16 match_flags;
+ __u16 vendor;
+ __u16 product;
+ __u16 revision;
+};
+
+#define BMI_DEVICE_ID_MATCH_VENDOR (1)
+#define BMI_DEVICE_ID_MATCH_PRODUCT (2)
+#define BMI_DEVICE_ID_MATCH_REVISION (4)
+
struct parisc_device_id {
__u8 hw_type; /* 5 bits used */
__u8 hversion_rev; /* 4 bits */
View
20 scripts/mod/file2alias.c
@@ -288,6 +288,22 @@ static int do_pci_entry(const char *filename,
return 1;
}
+/* Looks like: bmi:vNpNrN. */
+static int do_bmi_entry(const char *filename,
+ struct bmi_device_id *id, char *alias)
+{
+ id->match_flags = TO_NATIVE(id->match_flags);
+ id->vendor = TO_NATIVE(id->vendor);
+ id->product = TO_NATIVE(id->product);
+ id->revision = TO_NATIVE(id->revision);
+
+ strcpy(alias, "bmi:");
+ ADD(alias, "v", id->match_flags & BMI_DEVICE_ID_MATCH_VENDOR, id->vendor);
+ ADD(alias, "p", id->match_flags & BMI_DEVICE_ID_MATCH_PRODUCT, id->product);
+ ADD(alias, "r", id->match_flags & BMI_DEVICE_ID_MATCH_REVISION, id->revision);
+ return 1;
+}
+
/* looks like: "ccw:tNmNdtNdmN" */
static int do_ccw_entry(const char *filename,
struct ccw_device_id *id, char *alias)
@@ -789,6 +805,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
do_table(symval, sym->st_size,
sizeof(struct ieee1394_device_id), "ieee1394",
do_ieee1394_entry, mod);
+ else if (sym_is(symname, "__mod_bmi_device_table"))
+ do_table(symval, sym->st_size,
+ sizeof(struct bmi_device_id), "bmi",
+ do_bmi_entry, mod);
else if (sym_is(symname, "__mod_ccw_device_table"))
do_table(symval, sym->st_size,
sizeof(struct ccw_device_id), "ccw",
View
8 sound/soc/omap/Kconfig
@@ -47,6 +47,14 @@ config SND_OMAP_SOC_OMAP3EVM
help
Say Y if you want to add support for SoC audio on the omap3evm board.
+config SND_OMAP_SOC_OMAP3BUG
+ tristate "SoC Audio support for Bug Labs bugbase board"
+ depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3BUG
+ select SND_OMAP_SOC_MCBSP
+ select SND_SOC_TWL4030
+ help
+ Say Y if you want to add support for SoC audio on the bugbase board.
+
config SND_OMAP_SOC_SDP3430
tristate "SoC Audio support for Texas Instruments SDP3430"
depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_3430SDP
View
2 sound/soc/omap/Makefile
@@ -11,6 +11,7 @@ snd-soc-osk5912-objs := osk5912.o
snd-soc-overo-objs := overo.o
snd-soc-omap2evm-objs := omap2evm.o
snd-soc-omap3evm-objs := omap3evm.o
+snd-soc-omap3bug-objs := omap3bug.o
snd-soc-sdp3430-objs := sdp3430.o
snd-soc-omap3pandora-objs := omap3pandora.o
snd-soc-omap3beagle-objs := omap3beagle.o
@@ -20,6 +21,7 @@ obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
+obj-$(CONFIG_MACH_OMAP3BUG) += snd-soc-omap3bug.o
obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o

0 comments on commit 493bd27

Please sign in to comment.
Something went wrong with that request. Please try again.