diff options
| author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-04-01 20:32:01 +0200 |
|---|---|---|
| committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-04-01 20:32:01 +0200 |
| commit | a2f2b1a1bcc8c44d5e4b076398c0fca897c968ee (patch) | |
| tree | eb1f91fcde8513ab02c81152f88fea3a55cc2cc1 /recipes/linux | |
| parent | d67a64916ea1ff030ebb89dc8e8f9dd207d703fc (diff) | |
| parent | d2e9587dd31e061d378f4c9730083e1f89e31f14 (diff) | |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/linux')
| -rw-r--r-- | recipes/linux/linux-2.6.27/boc01/010-090112-mii.patch | 503 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.27/boc01/boc01.dts | 19 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/001-090114-sqn11x0-usb-hack.patch | 17 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/004-081205-usb.patch | 16 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/005-090226-isl12024.patch | 693 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/007-081217-lm73.patch | 269 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/008-081208-spi.patch | 147 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/011-090115-gpio.patch | 440 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/012-090219-capsense.patch | 883 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/013-090306-lcd.patch | 1090 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/boc01.dts | 340 | ||||
| -rw-r--r-- | recipes/linux/linux-2.6.29/boc01/defconfig | 2041 | ||||
| -rw-r--r-- | recipes/linux/linux_2.6.27.bb | 3 | ||||
| -rw-r--r-- | recipes/linux/linux_2.6.29.bb | 13 |
14 files changed, 5952 insertions, 522 deletions
diff --git a/recipes/linux/linux-2.6.27/boc01/010-090112-mii.patch b/recipes/linux/linux-2.6.27/boc01/010-090112-mii.patch deleted file mode 100644 index 33c6cb7498..0000000000 --- a/recipes/linux/linux-2.6.27/boc01/010-090112-mii.patch +++ /dev/null @@ -1,503 +0,0 @@ -Index: linux-2.6.27/drivers/net/gianfar_ethtool.c -=================================================================== ---- linux-2.6.27.orig/drivers/net/gianfar_ethtool.c -+++ linux-2.6.27/drivers/net/gianfar_ethtool.c -@@ -182,13 +182,7 @@ static void gfar_gdrvinfo(struct net_dev - - static int gfar_ssettings(struct net_device *dev, struct ethtool_cmd *cmd) - { -- struct gfar_private *priv = netdev_priv(dev); -- struct phy_device *phydev = priv->phydev; -- -- if (NULL == phydev) -- return -ENODEV; -- -- return phy_ethtool_sset(phydev, cmd); -+ return 0; - } - - -@@ -196,15 +190,11 @@ static int gfar_ssettings(struct net_dev - static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd) - { - struct gfar_private *priv = netdev_priv(dev); -- struct phy_device *phydev = priv->phydev; -- -- if (NULL == phydev) -- return -ENODEV; - - cmd->maxtxpkt = priv->txcount; - cmd->maxrxpkt = priv->rxcount; - -- return phy_ethtool_gset(phydev, cmd); -+ return 0; - } - - /* Return the length of the register structure */ -@@ -232,18 +222,7 @@ static unsigned int gfar_usecs2ticks(str - unsigned int count; - - /* The timer is different, depending on the interface speed */ -- switch (priv->phydev->speed) { -- case SPEED_1000: -- count = GFAR_GBIT_TIME; -- break; -- case SPEED_100: -- count = GFAR_100_TIME; -- break; -- case SPEED_10: -- default: -- count = GFAR_10_TIME; -- break; -- } -+ count = GFAR_100_TIME; - - /* Make sure we return a number greater than 0 - * if usecs > 0 */ -@@ -256,18 +235,7 @@ static unsigned int gfar_ticks2usecs(str - unsigned int count; - - /* The timer is different, depending on the interface speed */ -- switch (priv->phydev->speed) { -- case SPEED_1000: -- count = GFAR_GBIT_TIME; -- break; -- case SPEED_100: -- count = GFAR_100_TIME; -- break; -- case SPEED_10: -- default: -- count = GFAR_10_TIME; -- break; -- } -+ count = GFAR_100_TIME; - - /* Make sure we return a number greater than 0 */ - /* if ticks is > 0 */ -@@ -283,9 +251,6 @@ static int gfar_gcoalesce(struct net_dev - if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) - return -EOPNOTSUPP; - -- if (NULL == priv->phydev) -- return -ENODEV; -- - cvals->rx_coalesce_usecs = gfar_ticks2usecs(priv, priv->rxtime); - cvals->rx_max_coalesced_frames = priv->rxcount; - -@@ -342,9 +307,6 @@ static int gfar_scoalesce(struct net_dev - else - priv->rxcoalescing = 1; - -- if (NULL == priv->phydev) -- return -ENODEV; -- - /* Check the bounds of the values */ - if (cvals->rx_coalesce_usecs > GFAR_MAX_COAL_USECS) { - pr_info("Coalescing is limited to %d microseconds\n", -Index: linux-2.6.27/drivers/net/gianfar.c -=================================================================== ---- linux-2.6.27.orig/drivers/net/gianfar.c -+++ linux-2.6.27/drivers/net/gianfar.c -@@ -116,7 +116,6 @@ static int gfar_change_mtu(struct net_de - static irqreturn_t gfar_error(int irq, void *dev_id); - static irqreturn_t gfar_transmit(int irq, void *dev_id); - static irqreturn_t gfar_interrupt(int irq, void *dev_id); --static void adjust_link(struct net_device *dev); - static void init_registers(struct net_device *dev); - static int init_phy(struct net_device *dev); - static int gfar_probe(struct platform_device *pdev); -@@ -124,7 +123,6 @@ static int gfar_remove(struct platform_d - static void free_skb_resources(struct gfar_private *priv); - static void gfar_set_multi(struct net_device *dev); - static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); --static void gfar_configure_serdes(struct net_device *dev); - static int gfar_poll(struct napi_struct *napi, int budget); - #ifdef CONFIG_NET_POLL_CONTROLLER - static void gfar_netpoll(struct net_device *dev); -@@ -424,8 +422,6 @@ static int gfar_suspend(struct platform_ - tempval = gfar_read(&priv->regs->maccfg2); - tempval |= MACCFG2_MPEN; - gfar_write(&priv->regs->maccfg2, tempval); -- } else { -- phy_stop(priv->phydev); - } - } - -@@ -438,17 +434,12 @@ static int gfar_resume(struct platform_d - struct gfar_private *priv = netdev_priv(dev); - unsigned long flags; - u32 tempval; -- int magic_packet = priv->wol_en && -- (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET); - - if (!netif_running(dev)) { - netif_device_attach(dev); - return 0; - } - -- if (!magic_packet && priv->phydev) -- phy_start(priv->phydev); -- - /* Disable Magic Packet mode, in case something - * else woke us up. - */ -@@ -476,47 +467,6 @@ static int gfar_resume(struct platform_d - #define gfar_resume NULL - #endif - --/* Reads the controller's registers to determine what interface -- * connects it to the PHY. -- */ --static phy_interface_t gfar_get_interface(struct net_device *dev) --{ -- struct gfar_private *priv = netdev_priv(dev); -- u32 ecntrl = gfar_read(&priv->regs->ecntrl); -- -- if (ecntrl & ECNTRL_SGMII_MODE) -- return PHY_INTERFACE_MODE_SGMII; -- -- if (ecntrl & ECNTRL_TBI_MODE) { -- if (ecntrl & ECNTRL_REDUCED_MODE) -- return PHY_INTERFACE_MODE_RTBI; -- else -- return PHY_INTERFACE_MODE_TBI; -- } -- -- if (ecntrl & ECNTRL_REDUCED_MODE) { -- if (ecntrl & ECNTRL_REDUCED_MII_MODE) -- return PHY_INTERFACE_MODE_RMII; -- else { -- phy_interface_t interface = priv->einfo->interface; -- -- /* -- * This isn't autodetected right now, so it must -- * be set by the device tree or platform code. -- */ -- if (interface == PHY_INTERFACE_MODE_RGMII_ID) -- return PHY_INTERFACE_MODE_RGMII_ID; -- -- return PHY_INTERFACE_MODE_RGMII; -- } -- } -- -- if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT) -- return PHY_INTERFACE_MODE_GMII; -- -- return PHY_INTERFACE_MODE_MII; --} -- - - /* Initializes driver's PHY state, and attaches to the PHY. - * Returns 0 on success. -@@ -524,10 +474,6 @@ static phy_interface_t gfar_get_interfac - static int init_phy(struct net_device *dev) - { - struct gfar_private *priv = netdev_priv(dev); -- uint gigabit_support = -- priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? -- SUPPORTED_1000baseT_Full : 0; -- struct phy_device *phydev; - char phy_id[BUS_ID_SIZE]; - phy_interface_t interface; - -@@ -537,54 +483,11 @@ static int init_phy(struct net_device *d - - snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); - -- interface = gfar_get_interface(dev); -- -- phydev = phy_connect(dev, phy_id, &adjust_link, 0, interface); -- -- if (interface == PHY_INTERFACE_MODE_SGMII) -- gfar_configure_serdes(dev); -- -- if (IS_ERR(phydev)) { -- printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); -- return PTR_ERR(phydev); -- } -- -- /* Remove any features not supported by the controller */ -- phydev->supported &= (GFAR_SUPPORTED | gigabit_support); -- phydev->advertising = phydev->supported; -- -- priv->phydev = phydev; -+ interface = PHY_INTERFACE_MODE_MII; - - return 0; - } - --/* -- * Initialize TBI PHY interface for communicating with the -- * SERDES lynx PHY on the chip. We communicate with this PHY -- * through the MDIO bus on each controller, treating it as a -- * "normal" PHY at the address found in the TBIPA register. We assume -- * that the TBIPA register is valid. Either the MDIO bus code will set -- * it to a value that doesn't conflict with other PHYs on the bus, or the -- * value doesn't matter, as there are no other PHYs on the bus. -- */ --static void gfar_configure_serdes(struct net_device *dev) --{ -- struct gfar_private *priv = netdev_priv(dev); -- struct gfar_mii __iomem *regs = -- (void __iomem *)&priv->regs->gfar_mii_regs; -- int tbipa = gfar_read(&priv->regs->tbipa); -- -- /* Single clk mode, mii mode off(for serdes communication) */ -- gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); -- -- gfar_local_mdio_write(regs, tbipa, MII_ADVERTISE, -- ADVERTISE_1000XFULL | ADVERTISE_1000XPAUSE | -- ADVERTISE_1000XPSE_ASYM); -- -- gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | -- BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); --} -- - static void init_registers(struct net_device *dev) - { - struct gfar_private *priv = netdev_priv(dev); -@@ -678,8 +581,6 @@ void stop_gfar(struct net_device *dev) - struct gfar __iomem *regs = priv->regs; - unsigned long flags; - -- phy_stop(priv->phydev); -- - /* Lock it down */ - spin_lock_irqsave(&priv->txlock, flags); - spin_lock(&priv->rxlock); -@@ -949,7 +850,6 @@ int startup_gfar(struct net_device *dev) - } - } - -- phy_start(priv->phydev); - - /* Configure the coalescing support */ - if (priv->txcoalescing) -@@ -1217,9 +1117,6 @@ static int gfar_close(struct net_device - cancel_work_sync(&priv->reset_task); - stop_gfar(dev); - -- /* Disconnect from the PHY */ -- phy_disconnect(priv->phydev); -- priv->phydev = NULL; - - netif_stop_queue(dev); - -@@ -1777,86 +1674,6 @@ static irqreturn_t gfar_interrupt(int ir - return IRQ_HANDLED; - } - --/* Called every time the controller might need to be made -- * aware of new link state. The PHY code conveys this -- * information through variables in the phydev structure, and this -- * function converts those variables into the appropriate -- * register values, and can bring down the device if needed. -- */ --static void adjust_link(struct net_device *dev) --{ -- struct gfar_private *priv = netdev_priv(dev); -- struct gfar __iomem *regs = priv->regs; -- unsigned long flags; -- struct phy_device *phydev = priv->phydev; -- int new_state = 0; -- -- spin_lock_irqsave(&priv->txlock, flags); -- if (phydev->link) { -- u32 tempval = gfar_read(®s->maccfg2); -- u32 ecntrl = gfar_read(®s->ecntrl); -- -- /* Now we make sure that we can be in full duplex mode. -- * If not, we operate in half-duplex mode. */ -- if (phydev->duplex != priv->oldduplex) { -- new_state = 1; -- if (!(phydev->duplex)) -- tempval &= ~(MACCFG2_FULL_DUPLEX); -- else -- tempval |= MACCFG2_FULL_DUPLEX; -- -- priv->oldduplex = phydev->duplex; -- } -- -- if (phydev->speed != priv->oldspeed) { -- new_state = 1; -- switch (phydev->speed) { -- case 1000: -- tempval = -- ((tempval & ~(MACCFG2_IF)) | MACCFG2_GMII); -- break; -- case 100: -- case 10: -- tempval = -- ((tempval & ~(MACCFG2_IF)) | MACCFG2_MII); -- -- /* Reduced mode distinguishes -- * between 10 and 100 */ -- if (phydev->speed == SPEED_100) -- ecntrl |= ECNTRL_R100; -- else -- ecntrl &= ~(ECNTRL_R100); -- break; -- default: -- if (netif_msg_link(priv)) -- printk(KERN_WARNING -- "%s: Ack! Speed (%d) is not 10/100/1000!\n", -- dev->name, phydev->speed); -- break; -- } -- -- priv->oldspeed = phydev->speed; -- } -- -- gfar_write(®s->maccfg2, tempval); -- gfar_write(®s->ecntrl, ecntrl); -- -- if (!priv->oldlink) { -- new_state = 1; -- priv->oldlink = 1; -- } -- } else if (priv->oldlink) { -- new_state = 1; -- priv->oldlink = 0; -- priv->oldspeed = 0; -- priv->oldduplex = -1; -- } -- -- if (new_state && netif_msg_link(priv)) -- phy_print_status(phydev); -- -- spin_unlock_irqrestore(&priv->txlock, flags); --} - - /* Update the hash table based on the current list of multicast - * addresses we subscribe to. Also, change the promiscuity of -Index: linux-2.6.27/drivers/net/gianfar.h -=================================================================== ---- linux-2.6.27.orig/drivers/net/gianfar.h -+++ linux-2.6.27/drivers/net/gianfar.h -@@ -150,7 +150,7 @@ extern const char gfar_driver_version[]; - #define MACCFG1_SYNCD_TX_EN 0x00000002 - #define MACCFG1_TX_EN 0x00000001 - --#define MACCFG2_INIT_SETTINGS 0x00007205 -+#define MACCFG2_INIT_SETTINGS 0x00007105 - #define MACCFG2_FULL_DUPLEX 0x00000001 - #define MACCFG2_IF 0x00000300 - #define MACCFG2_MII 0x00000100 -@@ -748,7 +748,6 @@ struct gfar_private { - struct gianfar_platform_data *einfo; - - /* PHY stuff */ -- struct phy_device *phydev; - struct mii_bus *mii_bus; - int oldspeed; - int oldduplex; -Index: linux-2.6.27/drivers/net/gianfar_mii.c -=================================================================== ---- linux-2.6.27.orig/drivers/net/gianfar_mii.c -+++ linux-2.6.27/drivers/net/gianfar_mii.c -@@ -217,28 +217,10 @@ static int gfar_mdio_probe(struct device - if (r) - return r; - -- if (phy_id == 0xffffffff) -- break; -- } -- -- /* The bus is full. We don't support using 31 PHYs, sorry */ -- if (i == 0) -- return -EBUSY; -- -- gfar_write(&enet_regs->tbipa, i); -- -- err = mdiobus_register(new_bus); -- -- if (0 != err) { -- printk (KERN_ERR "%s: Cannot register as MDIO bus\n", -- new_bus->name); -- goto bus_register_fail; - } - - return 0; - --bus_register_fail: -- iounmap(regs); - reg_map_fail: - kfree(new_bus); - -Index: linux-2.6.27/drivers/net/gianfar_mii.h -=================================================================== ---- linux-2.6.27.orig/drivers/net/gianfar_mii.h -+++ linux-2.6.27/drivers/net/gianfar_mii.h -@@ -27,7 +27,6 @@ - | SUPPORTED_10baseT_Full \ - | SUPPORTED_100baseT_Half \ - | SUPPORTED_100baseT_Full \ -- | SUPPORTED_Autoneg \ - | SUPPORTED_MII) - - struct gfar_mii { -Index: linux-2.6.27/drivers/net/phy/phy_device.c -=================================================================== ---- linux-2.6.27.orig/drivers/net/phy/phy_device.c -+++ linux-2.6.27/drivers/net/phy/phy_device.c -@@ -281,7 +281,7 @@ struct phy_device * phy_connect(struct n - if (IS_ERR(phydev)) - return phydev; - -- phy_prepare_link(phydev, handler); -+ phydev->link = 1; - - phy_start_machine(phydev, NULL); - -@@ -302,7 +302,7 @@ void phy_disconnect(struct phy_device *p - phy_stop_interrupts(phydev); - - phy_stop_machine(phydev); -- -+ - phydev->adjust_link = NULL; - - phy_detach(phydev); -@@ -438,7 +438,7 @@ int genphy_config_advert(struct phy_devi - if (adv < 0) - return adv; - -- adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | -+ adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | - ADVERTISE_PAUSE_ASYM); - if (advertise & ADVERTISED_10baseT_Half) - adv |= ADVERTISE_10HALF; -@@ -503,7 +503,7 @@ int genphy_setup_forced(struct phy_devic - - if (DUPLEX_FULL == phydev->duplex) - ctl |= BMCR_FULLDPLX; -- -+ - err = phy_write(phydev, MII_BMCR, ctl); - - if (err < 0) -@@ -671,7 +671,7 @@ int genphy_read_status(struct phy_device - phydev->duplex = DUPLEX_FULL; - } else if (lpa & (LPA_100FULL | LPA_100HALF)) { - phydev->speed = SPEED_100; -- -+ - if (lpa & LPA_100FULL) - phydev->duplex = DUPLEX_FULL; - } else -Index: linux-2.6.27/include/linux/phy.h -=================================================================== ---- linux-2.6.27.orig/include/linux/phy.h -+++ linux-2.6.27/include/linux/phy.h -@@ -339,6 +339,11 @@ struct phy_driver { - u32 features; - u32 flags; - -+ /* Called during discovery to test if the -+ * device can attach to the bus, even if -+ phy id and mask do not match */ -+ bool (*detect)(struct mii_bus *bus, int addr); -+ - /* - * Called to initialize the PHY, - * including after a reset diff --git a/recipes/linux/linux-2.6.27/boc01/boc01.dts b/recipes/linux/linux-2.6.27/boc01/boc01.dts index ffc27abb31..710ef8fec0 100644 --- a/recipes/linux/linux-2.6.27/boc01/boc01.dts +++ b/recipes/linux/linux-2.6.27/boc01/boc01.dts @@ -2,7 +2,7 @@ * BollorĂ© telecom CPE v01 Device Tree Source * * Copyright 2005, 2006, 2007 Freescale Semiconductor Inc. - * Copyright 2008 BollorĂ© telecom. + * Copyright 2008, 2009 BollorĂ© telecom. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -171,7 +171,6 @@ mode = "cpu"; }; - /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ usb@23000 { compatible = "fsl-usb2-dr"; @@ -184,20 +183,6 @@ sleep = <&pmc 0x00300000>; }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x24520 0x20>; - phy4: ethernet-phy@4 { - interrupt-parent = <&ipic>; - interrupts = <20 0x8>; - reg = <0x4>; - device_type = "ethernet-phy"; - }; - }; - - enet1: ethernet@25000 { cell-index = <1>; device_type = "network"; @@ -207,7 +192,7 @@ local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <34 0x8 33 0x8 32 0x8>; interrupt-parent = <&ipic>; - phy-handle = < &phy4 >; + fixed-link = <1 1 100 0 0>; sleep = <&pmc 0x10000000>; fsl,magic-packet; }; diff --git a/recipes/linux/linux-2.6.29/boc01/001-090114-sqn11x0-usb-hack.patch b/recipes/linux/linux-2.6.29/boc01/001-090114-sqn11x0-usb-hack.patch new file mode 100644 index 0000000000..4bd44e25db --- /dev/null +++ b/recipes/linux/linux-2.6.29/boc01/001-090114-sqn11x0-usb-hack.patch @@ -0,0 +1,17 @@ +diff -ur linux-2.6.27.orig/drivers/usb/host/ehci-q.c linux-2.6.27/drivers/usb/host/ehci-q.c +--- linux-2.6.27.orig/drivers/usb/host/ehci-q.c 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27/drivers/usb/host/ehci-q.c 2009-01-06 18:31:38.000000000 +0100 +@@ -799,7 +799,12 @@ + * to help them do so. So now people expect to use + * such nonconformant devices with Linux too; sigh. + */ +- info1 |= max_packet(maxp) << 16; ++ struct usb_device_descriptor *desc = &urb->dev->descriptor; ++ if (desc->idVendor == cpu_to_le16(0x148e) && desc->idProduct == cpu_to_le16(0x0900)) { ++ info1 |= 256 << 16; ++ } else { ++ info1 |= max_packet(maxp) << 16; ++ } + info2 |= (EHCI_TUNE_MULT_HS << 30); + } else { /* PIPE_INTERRUPT */ + info1 |= max_packet (maxp) << 16; diff --git a/recipes/linux/linux-2.6.29/boc01/004-081205-usb.patch b/recipes/linux/linux-2.6.29/boc01/004-081205-usb.patch new file mode 100644 index 0000000000..dc7eba64d0 --- /dev/null +++ b/recipes/linux/linux-2.6.29/boc01/004-081205-usb.patch @@ -0,0 +1,16 @@ +--- linux-2.6.27.orig/arch/powerpc/platforms/83xx/usb.c 2008-12-05 14:50:43.000000000 +0100 ++++ linux-2.6.27.modif/arch/powerpc/platforms/83xx/usb.c 2008-12-05 14:51:17.000000000 +0100 +@@ -172,10 +172,10 @@ + !strcmp(prop, "utmi"))) { + u32 refsel; + +- if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) ++// if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) + refsel = CONTROL_REFSEL_24MHZ; +- else +- refsel = CONTROL_REFSEL_48MHZ; ++// else ++// refsel = CONTROL_REFSEL_48MHZ; + /* Set UTMI_PHY_EN and REFSEL */ + out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, + CONTROL_UTMI_PHY_EN | refsel); diff --git a/recipes/linux/linux-2.6.29/boc01/005-090226-isl12024.patch b/recipes/linux/linux-2.6.29/boc01/005-090226-isl12024.patch new file mode 100644 index 0000000000..ce71c3af80 --- /dev/null +++ b/recipes/linux/linux-2.6.29/boc01/005-090226-isl12024.patch @@ -0,0 +1,693 @@ +Index: linux-2.6.29/drivers/misc/eeprom/at24.c +=================================================================== +--- linux-2.6.29.orig/drivers/misc/eeprom/at24.c 2009-03-24 00:12:14.000000000 +0100 ++++ linux-2.6.29/drivers/misc/eeprom/at24.c 2009-04-01 17:37:45.000000000 +0200 +@@ -114,6 +114,8 @@ + { "spd", AT24_DEVICE_MAGIC(2048 / 8, + AT24_FLAG_READONLY | AT24_FLAG_IRUGO) }, + { "24c04", AT24_DEVICE_MAGIC(4096 / 8, 0) }, ++ /* Intersil RTC/Unique-ID isl12024 eeprom handled here */ ++ { "isl12024",AT24_DEVICE_MAGIC(4096 / 8, AT24_FLAG_ADDR16) }, + /* 24rf08 quirk is handled at i2c-core */ + { "24c08", AT24_DEVICE_MAGIC(8192 / 8, 0) }, + { "24c16", AT24_DEVICE_MAGIC(16384 / 8, 0) }, +Index: linux-2.6.29/drivers/rtc/Kconfig +=================================================================== +--- linux-2.6.29.orig/drivers/rtc/Kconfig 2009-03-24 00:12:14.000000000 +0100 ++++ linux-2.6.29/drivers/rtc/Kconfig 2009-04-01 17:37:45.000000000 +0200 +@@ -128,6 +128,12 @@ + + if I2C + ++config RTC_DRV_ISL12024 ++ tristate "Intersil 12024 RTC/ UniqueID" ++ help ++ If you say yes .... ++ This driver can also be built as a module. ++ + config RTC_DRV_DS1307 + tristate "Dallas/Maxim DS1307/37/38/39/40, ST M41T00" + help +Index: linux-2.6.29/drivers/rtc/Makefile +=================================================================== +--- linux-2.6.29.orig/drivers/rtc/Makefile 2009-03-24 00:12:14.000000000 +0100 ++++ linux-2.6.29/drivers/rtc/Makefile 2009-04-01 17:37:45.000000000 +0200 +@@ -39,6 +39,7 @@ + obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o + obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o + obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o ++obj-$(CONFIG_RTC_DRV_ISL12024) += rtc-isl12024.o + obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o + obj-$(CONFIG_RTC_DRV_M41T94) += rtc-m41t94.o + obj-$(CONFIG_RTC_DRV_M48T35) += rtc-m48t35.o +Index: linux-2.6.29/drivers/rtc/isl12024.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.29/drivers/rtc/isl12024.h 2009-04-01 17:37:45.000000000 +0200 +@@ -0,0 +1,100 @@ ++/* ++ * Intersil ISL12024 chip registers definitions ++ * ++ * ++ * Copyright (C) 2008, CenoSYS (www.cenosys.com). ++ * Guillaume Ligneul ++ * Guillaume.ligneul@gmail.com ++ * ++ * This software program is licensed subject to the GNU General Public License ++ * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html ++ */ ++ ++#ifndef ISL12024_H_ ++#define ISL12024_H_ ++ ++#define ISL12024_REG_SR 0x3F /* status register */ ++#define ISL12024_REG_Y2K 0x37 ++#define ISL12024_REG_DW 0x36 ++#define ISL12024_REG_YR 0x35 ++#define ISL12024_REG_MO 0x34 ++#define ISL12024_REG_DT 0x33 ++#define ISL12024_REG_HR 0x32 ++#define ISL12024_REG_MN 0x31 ++#define ISL12024_REG_SC 0x30 ++#define ISL12024_REG_DTR 0x13 ++#define ISL12024_REG_ATR 0x12 ++#define ISL12024_REG_INT 0x11 ++#define ISL12024_REG_0 0x10 ++#define ISL12024_REG_Y2K1 0x0F ++#define ISL12024_REG_DWA1 0x0E ++#define ISL12024_REG_YRA1 0x0D ++#define ISL12024_REG_MOA1 0x0C ++#define ISL12024_REG_DTA1 0x0B ++#define ISL12024_REG_HRA1 0x0A ++#define ISL12024_REG_MNA1 0x09 ++#define ISL12024_REG_SCA1 0x08 ++#define ISL12024_REG_Y2K0 0x07 ++#define ISL12024_REG_DWA0 0x06 ++#define ISL12024_REG_YRA0 0x05 ++#define ISL12024_REG_MOA0 0x04 ++#define ISL12024_REG_DTA0 0x03 ++#define ISL12024_REG_HRA0 0x02 ++#define ISL12024_REG_MNA0 0x01 ++#define ISL12024_REG_SCA0 0x00 ++ ++#define ISL12024_CCR_BASE 0x30 /* Base address of CCR */ ++#define ISL12024_ALM0_BASE 0x00 /* Base address of ALARM0 */ ++ ++#define ISL12024_SR_RTCF 0x01 /* Clock failure */ ++#define ISL12024_SR_WEL 0x02 /* Write Enable Latch */ ++#define ISL12024_SR_RWEL 0x04 /* Register Write Enable */ ++#define ISL12024_SR_AL0 0x20 /* Alarm 0 match */ ++ ++#define ISL12024_DTR_DTR0 0x01 ++#define ISL12024_DTR_DTR1 0x02 ++#define ISL12024_DTR_DTR2 0x04 ++ ++#define ISL12024_HR_MIL 0x80 /* Set in ccr.hour for 24 hr mode */ ++ ++#define ISL12024_INT_AL0E 0x20 /* Alarm 0 enable */ ++ ++/* I2C ADDRESS */ ++#define ISL12024_I2C_ADDR 0xDE ++#define ISL12024_I2C_EEPROM_ADDR 0x57 ++ ++/* device id section */ ++#define ISL12024_REG_ID 0x20 ++ ++/* Register map */ ++/* rtc section */ ++#define ISL12024_REG_HR_MIL (1<<7) /* 24h/12h mode */ ++#define ISL12024_REG_HR_PM (1<<5) /* PM/AM bit in 12h mode */ ++//#define ISL12024_REG_DT 0x33 /* Date */ ++//#define ISL12024_REG_MO 0x34 /* Month */ ++//#define ISL12024_REG_YR 0x35 /* Year */ ++//#define ISL12024_REG_DW 0x36 ++//#define ISL12024_REG_Y2K 0x37 ++#define ISL12024_RTC_SECTION_LEN 8 ++ ++/* control/status section */ ++//#define ISL12024_REG_SR 0x3F ++//#define ISL12024_REG_SR_BAT (1<<7) /* battery */ ++//#define ISL12024_REG_SR_AL1 (1<<6) /* alarm 0 */ ++//#define ISL12024_REG_SR_AL0 (1<<5) /* alarm 1 */ ++//#define ISL12024_REG_SR_OSCF (1<<4) /* oscillator fail */ ++//#define ISL12024_REG_SR_RWEL (1<<2) /* register write enable latch */ ++//#define ISL12024_REG_SR_WEL (1<<1) /* write enable latch */ ++//#define ISL12024_REG_SR_RTCF (1<<0) /* rtc fail */ ++//#define ISL12024_REG_INT 0x11 ++ ++#define CCR_SEC 0 ++#define CCR_MIN 1 ++#define CCR_HOUR 2 ++#define CCR_MDAY 3 ++#define CCR_MONTH 4 ++#define CCR_YEAR 5 ++#define CCR_WDAY 6 ++#define CCR_Y2K 7 ++ ++#endif /*ISL12024_H_*/ +Index: linux-2.6.29/drivers/rtc/rtc-isl12024.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.29/drivers/rtc/rtc-isl12024.c 2009-04-01 17:37:45.000000000 +0200 +@@ -0,0 +1,541 @@ ++/* ++ * Intersil ISL12024 class driver ++ * ++ * ++ * Copyright (C) 2007, CenoSYS (www.cenosys.com). ++ * ++ * Guillaume Ligneul <guillaume.ligneul@gmail.com> ++ * Sylvain Giroudon <sylvain.giroudon@goobie.fr> ++ * ++ * This software program is licensed subject to the GNU General Public License ++ * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html ++ */ ++ ++#include <linux/module.h> ++#include <linux/i2c.h> ++#include <linux/bcd.h> ++#include <linux/rtc.h> ++#include <linux/proc_fs.h> ++#include <linux/delay.h> ++ ++#include "isl12024.h" ++ ++ ++#define DBG 1 ++#undef DBG ++ ++#define DRV_NAME "isl12024" ++#define DRV_VERSION "0.2" ++ ++/* i2c configuration */ ++static const unsigned short normal_i2c[] = { ++ ISL12024_I2C_ADDR >>1, I2C_CLIENT_END ++}; ++I2C_CLIENT_INSMOD; ++ ++static int isl12024_get_status(struct i2c_client *client, unsigned char *sr); ++static int isl12024_fix_osc(struct i2c_client *client); ++ ++static int isl12024_attach_adapter(struct i2c_adapter *adapter); ++static int isl12024_detach_client(struct i2c_client *client); ++ ++ ++/* Bufer to store unique identifier in */ ++static u8 buf_id[ISL12024_RTC_SECTION_LEN] = { 0 }; ++ ++ ++// To debug (may be added in include/linux/i2c-id.h) ++#define I2C_DRIVERID_ISL12024 97 ++ ++ ++static struct i2c_driver isl12024_driver = { ++ .driver = { ++ .name = DRV_NAME, ++ }, ++ .id = I2C_DRIVERID_ISL12024, ++ .attach_adapter = &isl12024_attach_adapter, ++ .detach_client = &isl12024_detach_client, ++}; ++ ++ ++int ++isl12024_i2c_read_regs(struct i2c_client *client, u8 reg, u8 buf[], ++ unsigned len) ++{ ++ int ret; ++ u8 dt_addr[2]; ++ ++ struct i2c_msg msgs[2] = { ++ { ++ .addr = client->addr, ++ .flags = 0, ++ .len = 2, ++ .buf = dt_addr, ++ }, ++ { ++ .addr = client->addr, ++ .flags = I2C_M_RD, ++ .len = len , ++ .buf = buf , ++ }, ++ }; ++ ++ dt_addr[0] = 0; ++ dt_addr[1] = reg; ++ ++ ret = i2c_transfer(client->adapter, msgs, 2); ++ if ( ret < 0) { ++ dev_err(&client->dev, "read error\n"); ++ return -EIO; ++ } ++ return ret; ++} ++ ++EXPORT_SYMBOL(isl12024_i2c_read_regs); ++ ++ ++int ++isl12024_i2c_set_regs(struct i2c_client *client, u8 reg, u8 const buf[], ++ unsigned len) ++{ ++ int ret; ++ u8 i2c_buf[10]; ++ ++ struct i2c_msg msgs[1] = { ++ { ++ .addr = client->addr, ++ .flags = 0, ++ .len = len+2, ++ .buf = i2c_buf, ++ }, ++ }; ++ ++ i2c_buf[0] = 0; ++ i2c_buf[1] = reg; ++ ++ ++ memcpy(&i2c_buf[2], &buf[0], len ); ++ ++ ret = i2c_transfer(client->adapter, msgs, 1); ++ if ( ret < 0 ) ++ printk(KERN_ERR DRV_NAME ": i2c_transfer failed (%d)\n", ret); ++ ++ return ret; ++} ++ ++EXPORT_SYMBOL(isl12024_i2c_set_regs); ++ ++ ++static int isl12024_i2c_validate_client(struct i2c_client *client) ++{ ++ u8 regs[ISL12024_RTC_SECTION_LEN] = { 0, }; ++ u8 zero_mask[ISL12024_RTC_SECTION_LEN] = { ++ 0x80, 0x80, 0x40, 0xc0, 0xe0, 0x00, 0xf8, 0xc6 ++ }; ++ ++ int i; ++ int ret; ++ ++ ret = isl12024_i2c_read_regs(client, ISL12024_REG_SC, regs, ISL12024_RTC_SECTION_LEN); ++ ++ if (ret < 0) ++ return ret; ++ ++ for (i = 0; i < ISL12024_RTC_SECTION_LEN; ++i) { ++ if (regs[i] & zero_mask[i]) /* check if bits are cleared */ ++ return -ENODEV; ++ ++ } ++ ++ return 0; ++} ++ ++ ++static int isl12024_read_time(struct i2c_client *client, ++ struct rtc_time *tm) ++{ ++ unsigned char sr; ++ int err; ++ u8 regs[ISL12024_RTC_SECTION_LEN] = { 0, }; ++ ++ //printk(KERN_INFO DRV_NAME "%s\n ",__FUNCTION__ ); ++ ++ if (isl12024_get_status(client, &sr) < 0) { ++ dev_err(&client->dev, "%s: reading SR failed\n", __func__); ++ return -EIO; ++ } ++ ++ err = isl12024_i2c_read_regs(client, ISL12024_REG_SC, regs, ISL12024_RTC_SECTION_LEN); ++ ++#ifdef DBG ++ int i; ++ for(i=0; i<ISL12024_RTC_SECTION_LEN; i++) ++ printk(KERN_INFO DRV_NAME "0x%2X\n", regs[i]); ++#endif ++ ++ if (err < 0) { ++ dev_err(&client->dev, "%s: reading RTC section failed\n", ++ __func__); ++ return sr; ++ } ++ ++ tm->tm_sec = bcd2bin(regs[0]); ++ tm->tm_min = bcd2bin(regs[1]); ++ ++ { /* HR field has a more complex interpretation */ ++ const u8 _hr = regs[2]; |
