* [PATCH v2 1/2] USB: Update EHCI-platform driver to devicetree.
From: Tony Prisk @ 2012-10-20 22:10 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350771032-11527-1-git-send-email-linux@prisktech.co.nz>
This patch adds devicetree support to the EHCI-platform driver,
and removes the now unneeded ehci-vt8500.c
Existing platform properties are maintained, with the exception
the power_(on/off) and suspend function pointers.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
drivers/usb/host/ehci-hcd.c | 5 --
drivers/usb/host/ehci-platform.c | 61 +++++++++++++-
drivers/usb/host/ehci-vt8500.c | 171 --------------------------------------
include/linux/usb/ehci_pdriver.h | 1 +
4 files changed, 61 insertions(+), 177 deletions(-)
delete mode 100644 drivers/usb/host/ehci-vt8500.c
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 6bf6c42..42c8e84 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1274,11 +1274,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER cns3xxx_ehci_driver
#endif
-#ifdef CONFIG_ARCH_VT8500
-#include "ehci-vt8500.c"
-#define PLATFORM_DRIVER vt8500_ehci_driver
-#endif
-
#ifdef CONFIG_PLAT_SPEAR
#include "ehci-spear.c"
#define PLATFORM_DRIVER spear_ehci_hcd_driver
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 764e010..f44fc6a 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -19,6 +19,7 @@
* Licensed under the GNU/GPL. See COPYING for details.
*/
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <linux/usb/ehci_pdriver.h>
static int ehci_platform_reset(struct usb_hcd *hcd)
@@ -78,14 +79,60 @@ static const struct hc_driver ehci_platform_hc_driver = {
.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
};
+static u64 ehci_dma_mask = DMA_BIT_MASK(32);
+
static int __devinit ehci_platform_probe(struct platform_device *dev)
{
struct usb_hcd *hcd;
struct resource *res_mem;
struct usb_ehci_pdata *pdata = dev->dev.platform_data;
+ struct device_node *np = dev->dev.of_node;
int irq;
int err = -ENOMEM;
+ /* Are we being initialized from a DT-probed device? */
+ if (np) {
+ /*
+ * No platform data is being passed, so initalize pdata.
+ * Limitation: we can't support power_on, power_off or
+ * power_suspend function pointers from DT.
+ * TODO: The missing functions could be replaced with
+ * power sequence handlers.
+ */
+ pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
+ dev->dev.platform_data = pdata;
+
+ if (!pdata) {
+ pr_err("device tree platform data allocation failed\n");
+ return -ENOMEM;
+ }
+
+ /* Read the optional properties from DT node */
+ of_property_read_u32(np, "caps-offset", &pdata->caps_offset);
+ if (of_property_read_bool(np, "no_io_watchdog"))
+ pdata->no_io_watchdog = 1;
+ if (of_property_read_bool(np, "has-tt"))
+ pdata->has_tt = 1;
+ if (of_property_read_bool(np, "has-synopsys-hc-bug"))
+ pdata->has_synopsys_hc_bug = 1;
+
+ if (of_property_read_bool(np, "big-endian")) {
+ pdata->big_endian_desc = 1;
+ pdata->big_endian_mmio = 1;
+ } else {
+ if (of_property_read_bool(np, "big-endian-desc"))
+ pdata->big_endian_desc = 1;
+ if (of_property_read_bool(np, "big-endian-regs"))
+ pdata->big_endian_mmio = 1;
+ }
+ /* Right now device-tree probed devices don't get dma_mask set.
+ * Since shared usb code relies on it, set it here for now.
+ * Once we have dma capability bindings this can go away.
+ */
+ if (!dev->dev.dma_mask)
+ dev->dev.dma_mask = &ehci_dma_mask;
+ }
+
if (!pdata) {
WARN_ON(1);
return -ENODEV;
@@ -101,7 +148,7 @@ static int __devinit ehci_platform_probe(struct platform_device *dev)
}
res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (!res_mem) {
- pr_err("no memory recourse provided");
+ pr_err("no memory resource provided");
return -ENXIO;
}
@@ -163,6 +210,7 @@ static int __devexit ehci_platform_remove(struct platform_device *dev)
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);
platform_set_drvdata(dev, NULL);
+ devm_kfree(&dev->dev, pdata);
if (pdata->power_off)
pdata->power_off(dev);
@@ -215,6 +263,16 @@ static const struct platform_device_id ehci_platform_table[] = {
{ "ehci-platform", 0 },
{ }
};
+
+#ifdef CONFIG_OF
+static const struct of_device_id ehci_platform_ids[] = {
+ { .compatible = "linux,ehci-platform", },
+ {}
+};
+
+MODULE_DEVICE_TABLE(of, ehci_platform_ids);
+#endif
+
MODULE_DEVICE_TABLE(platform, ehci_platform_table);
static const struct dev_pm_ops ehci_platform_pm_ops = {
@@ -231,5 +289,6 @@ static struct platform_driver ehci_platform_driver = {
.owner = THIS_MODULE,
.name = "ehci-platform",
.pm = &ehci_platform_pm_ops,
+ .of_match_table = of_match_ptr(ehci_platform_ids),
}
};
diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c
deleted file mode 100644
index d3c9a3e..0000000
--- a/drivers/usb/host/ehci-vt8500.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * drivers/usb/host/ehci-vt8500.c
- *
- * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
- *
- * Based on ehci-au1xxx.c
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/of.h>
-#include <linux/platform_device.h>
-
-static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- int rc = 0;
-
- if (!udev->parent) /* udev is root hub itself, impossible */
- rc = -1;
- /* we only support lpm device connected to root hub yet */
- if (ehci->has_lpm && !udev->parent->parent) {
- rc = ehci_lpm_set_da(ehci, udev->devnum, udev->portnum);
- if (!rc)
- rc = ehci_lpm_check(ehci, udev->portnum);
- }
- return rc;
-}
-
-static const struct hc_driver vt8500_ehci_hc_driver = {
- .description = hcd_name,
- .product_desc = "VT8500 EHCI",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- */
- .reset = ehci_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- /*
- * call back when device connected and addressed
- */
- .update_device = ehci_update_device,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static u64 vt8500_ehci_dma_mask = DMA_BIT_MASK(32);
-
-static int vt8500_ehci_drv_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct ehci_hcd *ehci;
- struct resource *res;
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- /*
- * Right now device-tree probed devices don't get dma_mask set.
- * Since shared usb code relies on it, set it here for now.
- * Once we have dma capability bindings this can go away.
- */
- if (!pdev->dev.dma_mask)
- pdev->dev.dma_mask = &vt8500_ehci_dma_mask;
-
- if (pdev->resource[1].flags != IORESOURCE_IRQ) {
- pr_debug("resource[1] is not IORESOURCE_IRQ");
- return -ENOMEM;
- }
- hcd = usb_create_hcd(&vt8500_ehci_hc_driver, &pdev->dev, "VT8500");
- if (!hcd)
- return -ENOMEM;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (!hcd->regs) {
- pr_debug("ioremap failed");
- ret = -ENOMEM;
- goto err1;
- }
-
- ehci = hcd_to_ehci(hcd);
- ehci->caps = hcd->regs;
-
- ret = usb_add_hcd(hcd, pdev->resource[1].start,
- IRQF_SHARED);
- if (ret == 0) {
- platform_set_drvdata(pdev, hcd);
- return ret;
- }
-
-err1:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int vt8500_ehci_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
- usb_put_hcd(hcd);
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-static const struct of_device_id vt8500_ehci_ids[] = {
- { .compatible = "via,vt8500-ehci", },
- { .compatible = "wm,prizm-ehci", },
- {}
-};
-
-static struct platform_driver vt8500_ehci_driver = {
- .probe = vt8500_ehci_drv_probe,
- .remove = vt8500_ehci_drv_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "vt8500-ehci",
- .owner = THIS_MODULE,
- .of_match_table = of_match_ptr(vt8500_ehci_ids),
- }
-};
-
-MODULE_ALIAS("platform:vt8500-ehci");
-MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h
index c9d09f8..e9f74fa 100644
--- a/include/linux/usb/ehci_pdriver.h
+++ b/include/linux/usb/ehci_pdriver.h
@@ -41,6 +41,7 @@ struct usb_ehci_pdata {
unsigned big_endian_mmio:1;
unsigned port_power_on:1;
unsigned port_power_off:1;
+ unsigned no_io_watchdog:1;
/* Turn on all power and clocks */
int (*power_on)(struct platform_device *pdev);
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 0/2] Update ehci-platform driver to support devicetree
From: Tony Prisk @ 2012-10-20 22:10 UTC (permalink / raw)
To: linux-arm-kernel
This patchset updates the ehci-platform.c driver to allow device tree probing.
I have dropped support for the three function pointers (power_on, power_off
and power_suspend). If someone has knowledge of the power sequence functions
that are being implemented, these functions could be replaced (Sorry, I don't
know anything about implementing it).
port_power_(on_off) properties are not supported in DT as Alan Stern indicated
they are going to be removed.
v2:
* Add error checking for pdata memory allocation, and memory freeing in remove()
* Add no_io_watchdog field to usb_ehci_pdata as required by Florian Fainelli's
upcoming patchset and DT parsing for the field. This means we don't need to
patch this driver again after applying Florian's patchset, but will create a
minor merge-conflict.
* Changed compatible string to 'linux,ehci-platform' as a lot of the DT
properties are linux-specific.
* Changed properties to match those expected in usb-ehci binding.
Tony Prisk (2):
USB: Update EHCI-platform driver to devicetree.
USB: doc: Binding document for ehci-platform driver
.../devicetree/bindings/usb/ehci-platform.txt | 27 ++++
drivers/usb/host/ehci-hcd.c | 5 -
drivers/usb/host/ehci-platform.c | 61 ++++++-
drivers/usb/host/ehci-vt8500.c | 171 --------------------
include/linux/usb/ehci_pdriver.h | 1 +
5 files changed, 88 insertions(+), 177 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/ehci-platform.txt
delete mode 100644 drivers/usb/host/ehci-vt8500.c
--
1.7.9.5
^ permalink raw reply
* OMAP baseline test results for v3.7-rc2
From: Paul Walmsley @ 2012-10-20 21:26 UTC (permalink / raw)
To: linux-arm-kernel
Here are some basic OMAP test results for Linux v3.7-rc2.
Logs and other details at:
http://www.pwsan.com/omap/testlogs/test_v3.7-rc2/20121020134755/
Passing tests
-------------
Boot to userspace: 3517evm, 3530es3beagle, 3730beaglexm, 37xxevm,
4430es2panda, 5912osk, am335xbone
PM ret/off, suspend + dynamic idle: (none)
Failing tests: fixed by posted patches
--------------------------------------
Boot tests:
* 2430sdp: vfp_reload_hw oops during MMC initialization
- Kernel attempts to save FP registers that don't exist; fix posted:
- http://www.spinics.net/lists/arm-kernel/msg200646.html
* 2420n800: boot hangs during UART initialization
- http://lkml.org/lkml/2012/9/11/454
- Apparently fixed by http://marc.info/?l=linux-omap&m=135068547918479&w=2
* AM335x Beaglebone: omap2plus_defconfig kernels don't boot
- due to a GPMC bug
- Apparently fixed by http://www.spinics.net/lists/arm-kernel/msg200787.html
Other:
* 2420N800: powers down 30 seconds after boot
- Presumably due to missing CBUS patches for watchdog control
- http://lkml.org/lkml/2012/9/3/265
* 4430es2panda: omap_hwmod: mcpdm: cannot be enabled for reset (3)
- clock source is from an external I2C-controlled source
- must skip reset until the switchover to hwmod late init
- http://www.spinics.net/lists/arm-kernel/msg178138.html
Failing tests: needing investigation
------------------------------------
Boot tests:
* CM-T3517: L3 in-band error with IPSS during boot
- Cause unknown but see http://marc.info/?l=linux-omap&m=134833869730129&w=2
- Longstanding issue; does not occur on the 3517EVM
* 3517EVM & CM-T3517: boot hangs with NFS root
- Likely some Kconfig, board file, and PM issues with EMAC
* CM-T3517: boot hangs with MMC boot
- Due to missing MMC setup in board file
* 4460pandaes: boot fails early
- Appears to be timer-related
* 3530ES3 Beagle: I2C timeouts during userspace init
- Intermittent, appears on 5 out of 6 boots here
- Aaro Koskinen observes this also on N900
- Appears to be caused by commit 3db11feffc1ad2ab9dea27789e6b5b3032827adc
- http://marc.info/?l=linux-arm-kernel&m=135071372426971&w=2
PM tests:
* 3530es3beagle, 37xxevm, 3730beaglexm: I2C fails during resume from suspend
- Causes MMC to become unusable since regulators are not reenabled
- Can be worked around by reverting the I2C driver conversion to
threaded IRQs:
- http://marc.info/?l=linux-i2c&m=135026587102887&w=2
- Appears to be due to either an accounting or clocksource problem;
under discussion:
- http://marc.info/?l=linux-arm-kernel&m=135042360725821&w=2
- http://marc.info/?l=linux-arm-kernel&m=135066462211056&w=2
* 3530es3beagle: hangs during off-mode dynamic idle test
- Appears to be caused by commit 6c31b2150ff96755d24e0ab6d6fea08a7bf5c44c:
- http://marc.info/?l=linux-omap&m=135075364705188&w=2
* 37xx EVM: CORE not entering dynamic off-idle
- Cause unknown; dynamic retention-idle seems to work; system suspend to
off works
* 3730 Beagle XM: does not serial wake from off-idle suspend when console
UART doesn't clock gate ("debug ignore_loglevel")
- Not shown in the current test logs; cause unknown
* 3730 Beagle XM: OPPs do not initialize
- Several "find_device_opp: Invalid parameters" messages appear on boot;
related warnings follow
- Appears to be caused by commit 24d7b40a60cf19008334bcbcbd98da374d4d9c64
- http://marc.info/?l=linux-omap&m=135071425527076&w=2
Other:
* 4430es2panda: omap_hwmod: l3_instr: _wait_target_disable failed
- Unknown cause; could be due to the lack of hierarchical enable/disable
in hwmod code
- Paul
^ permalink raw reply
* Which kirkwood does your DT board use?
From: Michael Walle @ 2012-10-20 20:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020113800.GC21046@lunn.ch>
Am Samstag 20 Oktober 2012, 13:38:00 schrieb Andrew Lunn:
> Hi Folks
>
> All of you in the To: have contributed a DT based Kirkwood board port.
> Nearly all the DT files we have declare the CPU to be
> marvell,kirkwood-88f6281. For adding DT based pinctrl, to replace the
> mpp code, we need to know the exact kirkwood being used. It should be
> one of MV88F6180, MV88F6190, MV88F6192, MV88F6281 or MV88F6282.
>
> You can see what your hardware has a boot time:
>
> Kirkwood: MV88F6282-Rev-A0, TCLK=200000000.
>
> Please could you check your hardware and let me know what the correct
> CPU is. I can then fix the .dts files and prepare a first attempt at
> converting boards to pinctrl.
>
> Thanks
> Andrew
LS-XHL:
Kirkwood: MV88F6281-A0, TCLK=200000000
LS-CHLv2:
Kirkwood: MV88F6281-A1, TCLK=166666667
--
Michael
^ permalink raw reply
* [PATCH V2] ARM: Kirkwood: new board USI Topkick
From: Jason Cooper @ 2012-10-20 20:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350679752-11931-1-git-send-email-jason@lakedaemon.net>
This is a new kirkwood box made by Universal Scientific Industrial, Inc.
The product description is here:
http://www.usish.com/english/products_topkick1281p2.php
It is very similar to the dreamplug and other plug devices, with the
exception that it has room for a 2.5" SATA HDD internally.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
---
Changes since V1:
- changes nr-ports to 1 for sata0
- included board in defconfig
- trimmed #includes
- added mvsdio init call
arch/arm/boot/dts/Makefile | 3 +-
arch/arm/boot/dts/kirkwood-topkick.dts | 85 ++++++++++++++++++++++++++++++
arch/arm/configs/kirkwood_defconfig | 1 +
arch/arm/mach-kirkwood/Kconfig | 7 +++
arch/arm/mach-kirkwood/Makefile | 1 +
arch/arm/mach-kirkwood/board-dt.c | 4 ++
arch/arm/mach-kirkwood/board-usi_topkick.c | 83 +++++++++++++++++++++++++++++
arch/arm/mach-kirkwood/common.h | 6 +++
8 files changed, 189 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/kirkwood-topkick.dts
create mode 100644 arch/arm/mach-kirkwood/board-usi_topkick.c
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c1ce813..04fffc7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -38,7 +38,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
kirkwood-lschlv2.dtb \
kirkwood-lsxhl.dtb \
kirkwood-ts219-6281.dtb \
- kirkwood-ts219-6282.dtb
+ kirkwood-ts219-6282.dtb \
+ kirkwood-topkick.dtb
dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
msm8960-cdp.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
new file mode 100644
index 0000000..c0de5a7
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -0,0 +1,85 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+ model = "Univeral Scientific Industrial Co. Topkick-1281P2";
+ compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x10000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ ocp at f1000000 {
+ serial at 12000 {
+ clock-frequency = <200000000>;
+ status = "ok";
+ };
+
+ nand at 3000000 {
+ status = "okay";
+
+ partition at 0 {
+ label = "u-boot";
+ reg = <0x0000000 0x180000>;
+ };
+
+ partition at 180000 {
+ label = "u-boot env";
+ reg = <0x0180000 0x20000>;
+ };
+
+ partition at 200000 {
+ label = "uImage";
+ reg = <0x0200000 0x600000>;
+ };
+
+ partition at 800000 {
+ label = "uInitrd";
+ reg = <0x0800000 0x1000000>;
+ };
+
+ partition at 1800000 {
+ label = "rootfs";
+ reg = <0x1800000 0xe800000>;
+ };
+ };
+
+ sata at 80000 {
+ status = "okay";
+ nr-ports = <1>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ disk {
+ label = "topkick:yellow:disk";
+ gpios = <&gpio0 21 1>;
+ linux,default-trigger = "ide-disk";
+ };
+ system2 {
+ label = "topkick:red:system";
+ gpios = <&gpio1 5 1>;
+ };
+ system {
+ label = "topkick:blue:system";
+ gpios = <&gpio1 6 1>;
+ default-state = "on";
+ };
+ wifi {
+ label = "topkick:green:wifi";
+ gpios = <&gpio1 7 1>;
+ };
+ wifi2 {
+ label = "topkick:yellow:wifi";
+ gpios = <&gpio1 16 1>;
+ };
+ };
+};
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 74eee0c..72d6c28 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -27,6 +27,7 @@ CONFIG_MACH_GOFLEXNET_DT=y
CONFIG_MACH_LSXL_DT=y
CONFIG_MACH_IOMEGA_IX2_200_DT=y
CONFIG_MACH_KM_KIRKWOOD_DT=y
+CONFIG_MACH_TOPKICK_DT=y
CONFIG_MACH_TS219=y
CONFIG_MACH_TS41X=y
CONFIG_MACH_DOCKSTAR=y
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 50bca50..b8b5c22 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -130,6 +130,13 @@ config MACH_KM_KIRKWOOD_DT
Say 'Y' here if you want your kernel to support the
Keymile Kirkwood Reference Desgin, using Flattened Device Tree.
+config MACH_TOPKICK_DT
+ bool "USI Topkick (Flattened Device Tree)"
+ select ARCH_KIRKWOOD_DT
+ help
+ Say 'Y' here if you want your kernel to support the
+ USI Topkick, using Flattened Device Tree
+
config MACH_TS219
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 294779f..bd463df 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -31,3 +31,4 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o
obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
+obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 70c5a28..33e9217 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -96,6 +96,9 @@ static void __init kirkwood_dt_init(void)
if (of_machine_is_compatible("keymile,km_kirkwood"))
km_kirkwood_init();
+ if (of_machine_is_compatible("usi,topkick"))
+ usi_topkick_init();
+
of_platform_populate(NULL, kirkwood_dt_match_table,
kirkwood_auxdata_lookup, NULL);
}
@@ -112,6 +115,7 @@ static const char *kirkwood_dt_board_compat[] = {
"buffalo,lsxl",
"iom,ix2-200",
"keymile,km_kirkwood",
+ "usi,topkick",
NULL
};
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
new file mode 100644
index 0000000..a5e0826
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
+ *
+ * arch/arm/mach-kirkwood/board-dreamplug.c
+ *
+ * Marvell DreamPlug Reference Board Init for drivers not converted to
+ * flattened device tree yet.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/gpio.h>
+#include <linux/platform_data/mmc-mvsdio.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data topkick_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static struct mvsdio_platform_data topkick_mvsdio_data = {
+ /* unfortunately the CD signal has not been connected */
+};
+
+/*
+ * GPIO LED layout
+ *
+ * /-SYS_LED(2)
+ * |
+ * | /-DISK_LED
+ * | |
+ * | | /-WLAN_LED(2)
+ * | | |
+ * [SW] [*] [*] [*]
+ */
+
+/*
+ * Switch positions
+ *
+ * /-SW_LEFT
+ * |
+ * | /-SW_IDLE
+ * | |
+ * | | /-SW_RIGHT
+ * | | |
+ * PS [L] [I] [R] LEDS
+ */
+
+static unsigned int topkick_mpp_config[] __initdata = {
+ MPP21_GPIO, /* DISK_LED (low active) - yellow */
+ MPP36_GPIO, /* SATA0 power enable (high active) */
+ MPP37_GPIO, /* SYS_LED2 (low active) - red */
+ MPP38_GPIO, /* SYS_LED (low active) - blue */
+ MPP39_GPIO, /* WLAN_LED (low active) - green */
+ MPP43_GPIO, /* SW_LEFT (low active) */
+ MPP44_GPIO, /* SW_RIGHT (low active) */
+ MPP45_GPIO, /* SW_IDLE (low active) */
+ MPP46_GPIO, /* SW_LEFT (low active) */
+ MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
+ 0
+};
+
+#define TOPKICK_SATA0_PWR_ENABLE 36
+
+void __init usi_topkick_init(void)
+{
+ /*
+ * Basic setup. Needs to be called early.
+ */
+ kirkwood_mpp_conf(topkick_mpp_config);
+
+ /* SATA0 power enable */
+ gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
+
+ kirkwood_ehci_init();
+ kirkwood_ge00_init(&topkick_ge00_data);
+ kirkwood_sdio_init(&topkick_mvsdio_data);
+}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index bcffd7c..46b47d1 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -112,6 +112,12 @@ void km_kirkwood_init(void);
static inline void km_kirkwood_init(void) {};
#endif
+#ifdef CONFIG_MACH_TOPKICK_DT
+void usi_topkick_init(void);
+#else
+static inline void usi_topkick_init(void) {};
+#endif
+
/* early init functions not converted to fdt yet */
char *kirkwood_id(void);
void kirkwood_l2_init(void);
--
1.7.12.4
^ permalink raw reply related
* [PATCH 3/7] ARM: OMAP3xxx: hwmod: Convert SHAM crypto device data to hwmod
From: Paul Walmsley @ 2012-10-20 19:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350683640-15044-4-git-send-email-mgreer@animalcreek.com>
On Fri, 19 Oct 2012, Mark A. Greer wrote:
> From: "Mark A. Greer" <mgreer@animalcreek.com>
>
> Convert the device data for the OMAP3 SHAM2 (SHA1/MD5) crypto IP
> from explicit platform_data to hwmod. When bit 27 (OMAP3430_ST_SHA12_MASK)
> of the CM_IDLEST1_CORE register is 0, the SHA2 IP is present.
>
> CC: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
...
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 5b613fa..40211de 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -36,6 +36,7 @@
> #include "devices.h"
> #include "cm2xxx_3xxx.h"
> #include "cm-regbits-24xx.h"
> +#include "cm-regbits-34xx.h"
>
> #define L3_MODULES_MAX_LEN 12
> #define L3_MODULES 3
> @@ -453,40 +454,14 @@ static void omap_init_rng(void)
> WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
> }
>
> -#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
> -
> -#ifdef CONFIG_ARCH_OMAP3
> -static struct resource omap3_sham_resources[] = {
> - {
> - .start = OMAP34XX_SEC_SHA1MD5_BASE,
> - .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64,
> - .flags = IORESOURCE_MEM,
> - },
> - {
> - .start = 49 + OMAP_INTC_START,
> - .flags = IORESOURCE_IRQ,
> - },
> - {
> - .start = OMAP34XX_DMA_SHA1MD5_RX,
> - .flags = IORESOURCE_DMA,
> - }
> -};
> -static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources);
> -#else
> -#define omap3_sham_resources NULL
> -#define omap3_sham_resources_sz 0
> -#endif
> -
> -static struct platform_device sham_device = {
> - .name = "omap-sham",
> - .id = -1,
> -};
> -
> -static void omap_init_sham(void)
> +static void __init omap_init_sham(void)
> {
> - if (cpu_is_omap24xx() &&
> - (omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_IDLEST4) &
> - OMAP24XX_ST_SHA_MASK)) {
> + if ((cpu_is_omap24xx() &&
> + (omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_IDLEST4) &
> + OMAP24XX_ST_SHA_MASK)) ||
> + (cpu_is_omap34xx() &&
> + (!(omap2_cm_read_mod_reg(CORE_MOD, CM_IDLEST1) &
> + OMAP3430_ST_SHA12_MASK)))) {
Same comment here as on the CM read on the 2xxx patch.
- Paul
^ permalink raw reply
* [PATCH 2/7] ARM: OMAP2xxx: hwmod: Add DMA information for SHAM module
From: Paul Walmsley @ 2012-10-20 19:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350683640-15044-3-git-send-email-mgreer@animalcreek.com>
On Fri, 19 Oct 2012, Mark A. Greer wrote:
> From: "Mark A. Greer" <mgreer@animalcreek.com>
>
> Add the DMA information for the OMAP2 SHA module.
>
> CC: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
This can probably be combined with the first patch.
- Paul
^ permalink raw reply
* [PATCH 1/7] ARM: OMAP2xxx: hwmod: Convert SHAM crypto device data to hwmod
From: Paul Walmsley @ 2012-10-20 19:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350683640-15044-2-git-send-email-mgreer@animalcreek.com>
Hi
a few comments:
On Fri, 19 Oct 2012, Mark A. Greer wrote:
> From: "Mark A. Greer" <mgreer@animalcreek.com>
>
> Convert the device data for the OMAP2 SHAM crypto IP from
> explicit platform_data to hwmod. When bit 1 (OMAP24XX_ST_SHA_MASK)
> of the CM_IDLEST4_CORE register is set, the SHA IP is present.
>
> CC: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
...
>
> diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
> index c3cde1a..a09603c 100644
> --- a/arch/arm/mach-omap2/clock2420_data.c
> +++ b/arch/arm/mach-omap2/clock2420_data.c
> @@ -1905,6 +1905,7 @@ static struct omap_clk omap2420_clks[] = {
> CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X),
> CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X),
> CLK(NULL, "des_ick", &des_ick, CK_242X),
> + CLK(NULL, "sha_ick", &sha_ick, CK_242X),
This isn't needed; this alias already exists two lines below.
> CLK("omap-sham", "ick", &sha_ick, CK_242X),
> CLK(NULL, "sha_ick", &sha_ick, CK_242X),
> CLK("omap_rng", "ick", &rng_ick, CK_242X),
> diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
> index 22404fe..654e314 100644
> --- a/arch/arm/mach-omap2/clock2430_data.c
> +++ b/arch/arm/mach-omap2/clock2430_data.c
> @@ -1992,6 +1992,7 @@ static struct omap_clk omap2430_clks[] = {
> CLK(NULL, "sdma_ick", &sdma_ick, CK_243X),
> CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X),
> CLK(NULL, "des_ick", &des_ick, CK_243X),
> + CLK(NULL, "sha_ick", &sha_ick, CK_242X),
> CLK("omap-sham", "ick", &sha_ick, CK_243X),
> CLK("omap_rng", "ick", &rng_ick, CK_243X),
> CLK(NULL, "rng_ick", &rng_ick, CK_243X),
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index c8c2117..5b613fa 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -34,6 +34,8 @@
> #include "mux.h"
> #include "control.h"
> #include "devices.h"
> +#include "cm2xxx_3xxx.h"
> +#include "cm-regbits-24xx.h"
>
> #define L3_MODULES_MAX_LEN 12
> #define L3_MODULES 3
> @@ -453,24 +455,6 @@ static void omap_init_rng(void)
>
> #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
>
> -#ifdef CONFIG_ARCH_OMAP2
> -static struct resource omap2_sham_resources[] = {
> - {
> - .start = OMAP24XX_SEC_SHA1MD5_BASE,
> - .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64,
> - .flags = IORESOURCE_MEM,
> - },
> - {
> - .start = 51 + OMAP_INTC_START,
> - .flags = IORESOURCE_IRQ,
> - }
> -};
> -static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources);
> -#else
> -#define omap2_sham_resources NULL
> -#define omap2_sham_resources_sz 0
> -#endif
> -
> #ifdef CONFIG_ARCH_OMAP3
> static struct resource omap3_sham_resources[] = {
> {
> @@ -500,17 +484,27 @@ static struct platform_device sham_device = {
>
> static void omap_init_sham(void)
> {
> - if (cpu_is_omap24xx()) {
> - sham_device.resource = omap2_sham_resources;
> - sham_device.num_resources = omap2_sham_resources_sz;
> + if (cpu_is_omap24xx() &&
> + (omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_IDLEST4) &
> + OMAP24XX_ST_SHA_MASK)) {
Hmm. Not sure I understand the purpose of this CM read. Don't we want to
initialize this device unconditionally?
Also we're trying to get rid of all of the direct CM/PRM accesses outside
of the prm*.c/cm*.c code. If we need something like this, we should add
some support for it in hwmod & CM code, since that's where the data lives.
- Paul
^ permalink raw reply
* [PATCH 0/7] crypto: omap-sham updates
From: Paul Walmsley @ 2012-10-20 19:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350683640-15044-1-git-send-email-mgreer@animalcreek.com>
On Fri, 19 Oct 2012, Mark A. Greer wrote:
> From: "Mark A. Greer" <mgreer@animalcreek.com>
>
> This series updates the crypto omap-sham driver and supporting
> infrastructure.
Looks pretty good; this will make it easier for us to migrate the
omap_hwmod code to a LDM bus. Will reply to the original patches with a
few comments and questions.
One general comment - for us to merge these through the OMAP tree, we'll
need acks from the hardware crypto folks. AFAIK they are:
CRYPTO API
M: Herbert Xu <herbert@gondor.apana.org.au>
M: "David S. Miller" <davem@davemloft.net>
L: linux-crypto at vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
S: Maintained
F: Documentation/crypto/
F: arch/*/crypto/
F: crypto/
F: drivers/crypto/
F: include/crypto/
So it would be helpful if you could send those patches along to those
people and lists too, and ask them for acks.
- Paul
^ permalink raw reply
* [PATCH] usb: phy: samsung: Introducing usb phy driver for hsotg
From: Pavel Machek @ 2012-10-20 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121015132836.GT24333@arwen.pp.htv.fi>
Hi!
> > +#define S3C_PHYPWR (0x00)
...
> > +#define S3C_PHYCLK (0x04)
> > +
> > +#define S3C_PHYCLK_MODE_SERIAL (1 << 6)
> > +#define S3C_PHYCLK_EXT_OSC (1 << 5)
> > +#define S3C_PHYCLK_COMMON_ON_N (1 << 4)
> > +#define S3C_PHYCLK_ID_PULL (1 << 2)
> > +#define S3C_PHYCLK_CLKSEL_MASK (0x3 << 0)
> > +#define S3C_PHYCLK_CLKSEL_SHIFT (0)
> > +#define S3C_PHYCLK_CLKSEL_48M (0x0 << 0)
> > +#define S3C_PHYCLK_CLKSEL_12M (0x2 << 0)
> > +#define S3C_PHYCLK_CLKSEL_24M (0x3 << 0)
I believe these 0x 's should be removed. Ouch and << 0 is interesting,
too, just remove it.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Paul Walmsley @ 2012-10-20 18:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020183724.GA9984@netboy.at.omicron.at>
On Sat, 20 Oct 2012, Richard Cochran wrote:
> On Sat, Oct 20, 2012 at 06:12:35PM +0000, Paul Walmsley wrote:
> > Just tried omap2plus_defconfig here and the board didn't boot, confirming
> > your result. Will add a section to the testlog README.txt about that.
> >
> > > > In terms of differences from your setup, looks like we have different
> > > > X-Loader and u-boot; it wouldn't surprise me if we have different kernel
> > > > configs too.
>
> I tried both omap2plus_defconfig and your am33xx_only config, and
> neither one work with my (recent) u-boot version.
Just sent you the MLO and u-boot.img from here via private E-mail. Those
were the files that came with the BeagleBone SD card here.
TI also has a u-boot tree for the AM33xx; might be worth trying:
git://arago-project.org/git/projects/u-boot-am33x.git
- Paul
^ permalink raw reply
* Which kirkwood does your DT board use?
From: Simon Baatz @ 2012-10-20 18:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020113800.GC21046@lunn.ch>
Hi Andrew,
On Sat, Oct 20, 2012 at 01:38:00PM +0200, Andrew Lunn wrote:
> Hi Folks
>
> All of you in the To: have contributed a DT based Kirkwood board port.
> Nearly all the DT files we have declare the CPU to be
> marvell,kirkwood-88f6281. For adding DT based pinctrl, to replace the
> mpp code, we need to know the exact kirkwood being used. It should be
> one of MV88F6180, MV88F6190, MV88F6192, MV88F6281 or MV88F6282.
>
> You can see what your hardware has a boot time:
>
> Kirkwood: MV88F6282-Rev-A0, TCLK=200000000.
>
> Please could you check your hardware and let me know what the correct
> CPU is. I can then fix the .dts files and prepare a first attempt at
> converting boards to pinctrl.
>
My IB-NAS6210 says:
Kirkwood: MV88F6281-A1, TCLK=200000000.
I don't have a 6220, but I suppose it is the same since they seem to
use the same board internally.
- Simon
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Richard Cochran @ 2012-10-20 18:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1210201807170.27264@utopia.booyaka.com>
On Sat, Oct 20, 2012 at 06:12:35PM +0000, Paul Walmsley wrote:
> Just tried omap2plus_defconfig here and the board didn't boot, confirming
> your result. Will add a section to the testlog README.txt about that.
>
> > > In terms of differences from your setup, looks like we have different
> > > X-Loader and u-boot; it wouldn't surprise me if we have different kernel
> > > configs too.
I tried both omap2plus_defconfig and your am33xx_only config, and
neither one work with my (recent) u-boot version.
Thanks,
Richard
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Paul Walmsley @ 2012-10-20 18:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020180123.GA2630@netboy.at.omicron.at>
On Sat, 20 Oct 2012, Richard Cochran wrote:
> On Sat, Oct 20, 2012 at 04:27:19PM +0000, Paul Walmsley wrote:
> > > BeagleBone Rev. A6 does not boot v3.7-rc1, at least not for me.
> > > I recently posted the missing patches needed to make it work (but the
> > > patches are not by me).
> >
> > Those are the patches at:
> >
> > http://lists.arm.linux.org.uk/lurker/message/20121015.191630.bdae3c50.en.html
> >
> > ?
>
> Yes, that is right. Only the first patch is absoutely required for booting.
OK thanks.
> > Also are you using omap2plus_defconfig?
>
> Yes, but I de-selected a few items. I will try it again without
> changing anything.
Just tried omap2plus_defconfig here and the board didn't boot, confirming
your result. Will add a section to the testlog README.txt about that.
> > In terms of differences from your setup, looks like we have different
> > X-Loader and u-boot; it wouldn't surprise me if we have different kernel
> > configs too.
>
> What is X-Loader?
It's the "MLO" file on the SD card. The on-chip ROM code boots that.
Then X-Loader boots U-Boot. Am not sure if it should still be called
X-Loader - in your log it seems to be identifying itself as "U-Boot SPL" -
so maybe that's not the old "X-Loader" code any more.
- Paul
^ permalink raw reply
* [PATCH 1/2] USB: Update EHCI-platform driver to devicetree.
From: Tony Prisk @ 2012-10-20 18:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2209384.BKaXW2gI8I@bender>
On Sat, 2012-10-20 at 15:01 +0200, Florian Fainelli wrote:
> Hi Tony,
>
> On Saturday 20 October 2012 16:17:32 Tony Prisk wrote:
> > This patch adds devicetree support to the EHCI-platform driver,
> > and removes the now unneeded ehci-vt8500.c
> >
> > Existing platform properties are maintained, with the exception
> > the power_(on/off) and suspend function pointers.
>
> Ok, so I have recently sent a bit patchset to remove most OHCI/EHCI drivers
> that could be converted to the generic variants, series starts here:
> 1349701906-16481-1-git-send-email-florian at openwrt.org
>
> in this patchset I added a new property to the EHCI platform data:
> need_io_watchdog, which needs to be handled too from DT ideally.
>
> Adding device tree bindings is on my TODO after having a generic way
> to pass clocks to the ehci/ohci platform drivers, so you are right on time :)
>
> [snip]
>
> > + if (np) {
> > + /*
> > + * No platform data is being passed, so initalize pdata.
> > + * Limitation: we can't support power_on, power_off or
> > + * power_suspend function pointers from DT.
> > + * TODO: The missing functions could be replaced with
> > + * power sequence handlers.
> > + */
> > + pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
>
> Missing allocation failure handling here. And you should free this in
> ehci_platform_remove() accordingly.
Oops - good catch. Will fix.
>
> > + dev->dev.platform_data = pdata;
> > +
> > + /* Read the optional properties from DT node */
> > + of_property_read_u32(np, "caps-offset", &pdata->caps_offset);
> > + if (of_property_read_bool(np, "has-tt"))
> > + pdata->has_tt = 1;
> > + if (of_property_read_bool(np, "has-synopsys-hc-bug"))
> > + pdata->has_synopsys_hc_bug = 1;
> > + if (of_property_read_bool(np, "big-endian-desc"))
> > + pdata->big_endian_desc = 1;
> > + if (of_property_read_bool(np, "big-endian-mmio"))
> > + pdata->big_endian_mmio = 1;
>
> I would rather we remain compatible with ehci-ppc-of, by handling the
> big-endian property you set big_endian_mmiod and big_endian_desc to 1, and
> by setting them individually, you get what you expect.
I noticed in the usb-ehci.txt binding document, it lists
big-endian-regs, big-endian-desc and big-endian so perhaps we should
rename all these to match.
>
> > +
> > + /* Right now device-tree probed devices don't get dma_mask set.
> > + * Since shared usb code relies on it, set it here for now.
> > + * Once we have dma capability bindings this can go away.
> > + */
> > + if (!dev->dev.dma_mask)
> > + dev->dev.dma_mask = &ehci_dma_mask;
> > + }
> > +
> > if (!pdata) {
> > WARN_ON(1);
> > return -ENODEV;
> > @@ -215,6 +250,16 @@ static const struct platform_device_id ehci_platform_table[] = {
> > { "ehci-platform", 0 },
> > { }
> > };
> > +
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id ehci_platform_ids[] = {
> > + { .compatible = "ehci-platform", },
> > + {}
>
> ehci-platform is very linux-specific, so this should either be:
> "linux,ehci-platform", or "usb-ehci", pretty much like the ppc-of ehci driver.
Anyone has any preferences? This change should also be applied to
platform-uhci to keep everything uniform (and ohci-platform eventually
as well).
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Richard Cochran @ 2012-10-20 18:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1210201615170.24497@utopia.booyaka.com>
On Sat, Oct 20, 2012 at 04:27:19PM +0000, Paul Walmsley wrote:
> > BeagleBone Rev. A6 does not boot v3.7-rc1, at least not for me.
> > I recently posted the missing patches needed to make it work (but the
> > patches are not by me).
>
> Those are the patches at:
>
> http://lists.arm.linux.org.uk/lurker/message/20121015.191630.bdae3c50.en.html
>
> ?
Yes, that is right. Only the first patch is absoutely required for booting.
> Thanks for the report. Are you using the stock v3.7-rc1 DTS file in
> arch/arm/boot/dts/am335x-bone.dts ?
Yes.
> Also are you using omap2plus_defconfig?
Yes, but I de-selected a few items. I will try it again without
changing anything.
> Here's the console log from the boot test here:
>
> http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/20121017205513/boot/am335xbone/am335xbone_log.txt
>
> And here's the kernel config and uImage+DTB from the boot test here:
>
> http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/20121017205513/build/am33xx_only/
Okay, so there are a number of differences between your am33xx_only
and the omap2plus_defconfig. I will try it with your config as well.
> In terms of differences from your setup, looks like we have different
> X-Loader and u-boot; it wouldn't surprise me if we have different kernel
> configs too.
What is X-Loader?
Thanks,
Richard
^ permalink raw reply
* [PATCH 3/5] ARM: OMAP2+: powerdomain/PRM: move the low-level powerdomain functions into PRM
From: Paul Walmsley @ 2012-10-20 17:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <507FAAD7.6030209@ti.com>
Hi Rajendra, Russ, Santosh,
thanks for your Reviewed-bys and acks and comments. Have folded them into
the series here. Russ, the file headers have been updated per your
comments. Also while there, the copyrights from the
{clock,power}domainxxxx.c files were copied in, along with Rajendra's
authorship line.
- Paul
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Paul Walmsley @ 2012-10-20 17:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <507FC254.8030500@ti.com>
On Thu, 18 Oct 2012, Santosh Shilimkar wrote:
> On Thursday 18 October 2012 02:07 PM, Tero Kristo wrote:
> > On Thu, 2012-10-18 at 06:48 +0000, Paul Walmsley wrote:
> > >
> > > * 4430es2panda: clockevents problems early in boot
> > > - boots with dummy_timer
> > > - no one-shot mode so no-HZ is likely to fail
> >
> > I have a fix for this problem, however I am seeing this on omap4460
> > panda. The root cause seems to be that local timer init for OMAP is
> > using wrong interrupt number. It adds a wrong offset to the interrupt
> > (OMAP_INTC_START) which should be omitted. Will send a patch soon along
> > with a new version of core ret set.
> >
> This one is already fixed by [1] and Tony has sent pull request[1] to
> arm-soc maintainers for 3.7-rc1 which includes the fix.
Thanks, I've updated
http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/20121017205513/README.txt
- Paul
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Paul Walmsley @ 2012-10-20 17:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1210180517450.8674@utopia.booyaka.com>
Hello Venkatraman,
On Thu, 18 Oct 2012, Paul Walmsley wrote:
> Here are some basic OMAP test results for Linux v3.7-rc1.
> Logs and other details at http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/
...
> Failing tests: needing investigation
> ------------------------------------
...
> PM tests:
>
> * 3530es3beagle: hangs during off-mode dynamic idle test
> - Unknown cause; not investigated
Looks like this commit is causing some of our power management tests to
fail on v3.7-rc1:
commit 6c31b2150ff96755d24e0ab6d6fea08a7bf5c44c
Author: Venkatraman S <svenkatr@ti.com>
Date: Wed Aug 8 14:26:52 2012 +0530
mmc: omap_hsmmc: remove access to SYSCONFIG register
...
The failure can be seen in the following test log:
http://www.pwsan.com/omap/transcripts/20121020-3530es3beagle-off-mode-fail-pre-revert.txt
and with commit 6c31b215 reverted, the test succeeds:
http://www.pwsan.com/omap/transcripts/20121020-3530es3beagle-off-mode-fail-post-revert.txt
Could you please take a look and fix the problem?
- Paul
^ permalink raw reply
* Which kirkwood does your DT board use?
From: Alexander Holler @ 2012-10-20 16:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020113800.GC21046@lunn.ch>
Am 20.10.2012 13:38, schrieb Andrew Lunn:
> Hi Folks
>
> All of you in the To: have contributed a DT based Kirkwood board port.
> Nearly all the DT files we have declare the CPU to be
> marvell,kirkwood-88f6281. For adding DT based pinctrl, to replace the
> mpp code, we need to know the exact kirkwood being used. It should be
> one of MV88F6180, MV88F6190, MV88F6192, MV88F6281 or MV88F6282.
>
> You can see what your hardware has a boot time:
>
> Kirkwood: MV88F6282-Rev-A0, TCLK=200000000.
>
> Please could you check your hardware and let me know what the correct
> CPU is. I can then fix the .dts files and prepare a first attempt at
> converting boards to pinctrl.
The Dockstars are using this one:
Kirkwood: MV88F6281-A0, TCLK=200000000.
Regards,
Alexander
^ permalink raw reply
* OMAP baseline test results for v3.7-rc1
From: Paul Walmsley @ 2012-10-20 16:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121020141136.GA6433@netboy.at.omicron.at>
Hi Richard
On Sat, 20 Oct 2012, Richard Cochran wrote:
> On Thu, Oct 18, 2012 at 05:20:46AM +0000, Paul Walmsley wrote:
> >
> > Here are some basic OMAP test results for Linux v3.7-rc1.
> > Logs and other details at http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/
...
> > Passing tests
> > -------------
> >
> > Boot to userspace: 3517evm, 3530es3beagle, 3730beaglexm, 37xxevm,
> > 4430es2panda, 5912osk, am335xbone
...
> BeagleBone Rev. A6 does not boot v3.7-rc1, at least not for me.
> I recently posted the missing patches needed to make it work (but the
> patches are not by me).
Those are the patches at:
http://lists.arm.linux.org.uk/lurker/message/20121015.191630.bdae3c50.en.html
?
> Below I include the console log.
Thanks for the report. Are you using the stock v3.7-rc1 DTS file in
arch/arm/boot/dts/am335x-bone.dts ? Also are you using
omap2plus_defconfig?
...
Here's the console log from the boot test here:
http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/20121017205513/boot/am335xbone/am335xbone_log.txt
And here's the kernel config and uImage+DTB from the boot test here:
http://www.pwsan.com/omap/testlogs/test_v3.7-rc1/20121017205513/build/am33xx_only/
In terms of differences from your setup, looks like we have different
X-Loader and u-boot; it wouldn't surprise me if we have different kernel
configs too.
- Paul
^ permalink raw reply
* [PATCH v2 0/4] Add DT support for Network Space v2 and parents
From: Andrew Lunn @ 2012-10-20 16:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350468546-25901-1-git-send-email-simon.guinot@sequanux.org>
On Wed, Oct 17, 2012 at 12:09:02PM +0200, Simon Guinot wrote:
> This patch series provides DT support for LaCie NAS Network Space v2 and
> parents. This includes the following machines:
> - Internet Space v2
> - Network Space v2
> - Network Space Max v2
> - Network Space Lite v2
> - Network Space Mini v2
Looks good. Thanks for rebasing to 3.7-rc1.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* [PATCH] mfd: ab8500: add devicetree support for fuelgauge
From: Francesco Lavra @ 2012-10-20 15:52 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1350358619-1160-1-git-send-email-rajanikanth.hv@stericsson.com>
Hi Rajanikanth,
On 10/16/2012 05:36 AM, Rajanikanth H.V wrote:
> From: "Rajanikanth H.V" <rajanikanth.hv@stericsson.com>
>
> - This patch adds device tree support for fuelgauge driver
> - optimize bm devices platform_data usage and of_probe(...)
> Note: of_probe() routine for battery managed devices is made
> common across all bm drivers.
> - test status:
> - interrupt numbers assigned differs between legacy and FDT mode.
>
> Legacy platform_data Mode:
> root at ME:/ cat /proc/interrupts
> CPU0 CPU1
> 483: 0 0 ab8500 ab8500-ponkey-dbf
> 484: 0 0 ab8500 ab8500-ponkey-dbr
> 485: 0 0 ab8500 BATT_OVV
> 494: 0 1 ab8500
> 495: 0 0 ab8500 ab8500-rtc
> 501: 0 13 ab8500 NCONV_ACCU
> 503: 7 22 ab8500 CCEOC
> 504: 0 1 ab8500 CC_INT_CALIB
> 505: 0 0 ab8500 LOW_BAT_F
> 516: 0 34 ab8500 ab8500-gpadc
> 556: 0 0 ab8500 usb-link-status
>
> FDT Mode:
> root at ME:/ cat /proc/interrupts
> CPU0 CPU1
> 6: 0 0 ab8500 ab8500-ponkey-dbf
> 7: 0 0 ab8500 ab8500-ponkey-dbr
> 8: 0 0 ab8500 BATT_OVV
> 162: 0 7 ab8500 ab8500-gpadc
> 163: 0 1 ab8500
> 164: 0 0 ab8500 ab8500-rtc
> 484: 0 0 ab8500 usb-link-status
> 499: 0 4 ab8500 NCONV_ACCU
> 500: 0 0 ab8500 LOW_BAT_F
> 502: 0 1 ab8500 CC_INT_CALIB
> 503: 0 6 ab8500 CCEOC
>
> Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
[...]
> +int __devinit
> +bmdevs_of_probe(struct device *dev,
> + struct device_node *np,
> + struct abx500_bm_data **battery)
> +{
> + struct abx500_battery_type *btype;
> + struct device_node *np_bat_supply;
> + struct abx500_bm_data *bat;
> + int i, thermistor;
> + char *bat_tech = "UNKNOWN";
This initialization is useless.
> +
> + *battery = devm_kzalloc(dev, sizeof(*bat), GFP_KERNEL);
> + if (!*battery) {
> + dev_err(dev, "%s no mem for plat_data\n", __func__);
> + return -ENOMEM;
> + }
> + *battery = &ab8500_bm_data;
Looks like dynamic allocation here is not what you need, since you are
overwriting the pointer to the allocated data.
> +
> + /* get phandle to 'battery-info' node */
> + np_bat_supply = of_parse_phandle(np, "battery", 0);
> + if (!np_bat_supply) {
> + dev_err(dev, "missing property battery\n");
> + return -EINVAL;
> + }
> + if (of_property_read_bool(np_bat_supply,
> + "thermistor-on-batctrl"))
> + thermistor = NTC_INTERNAL;
> + else
> + thermistor = NTC_EXTERNAL;
> +
> + bat = *battery;
> + if (thermistor == NTC_EXTERNAL) {
> + bat->n_btypes = 4;
> + bat->bat_type = bat_type_ext_thermistor;
> + bat->adc_therm = ABx500_ADC_THERM_BATTEMP;
> + }
> + bat_tech = (char *)of_get_property(
> + np_bat_supply, "stericsson,battery-type", NULL);
No need to cast a void * to a char *.
> + if (!bat_tech) {
> + dev_warn(dev, "missing property battery-name/type\n");
> + strncpy(bat_tech, "UNKNOWN", 7);
You are writing at a NULL pointer here...
> + }
> + of_node_put(np_bat_supply);
You can't call of_node_put here, because you are going to use bat_tech
later on. You have to call it at the end of this function, after you are
done with bat_tech.
> +
> + if (strncmp(bat_tech, "LION", 4) == 0) {
> + bat->no_maintenance = true;
> + bat->chg_unknown_bat = true;
> + bat->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600;
> + bat->bat_type[BATTERY_UNKNOWN].termination_vol = 4150;
> + bat->bat_type[BATTERY_UNKNOWN].recharge_vol = 4130;
> + bat->bat_type[BATTERY_UNKNOWN].normal_cur_lvl = 520;
> + bat->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200;
> + }
> + /* select the battery resolution table */
> + for (i = 0; i < bat->n_btypes; ++i) {
> + btype = (bat->bat_type + i);
> + if (thermistor == NTC_EXTERNAL) {
> + btype->batres_tbl =
> + temp_to_batres_tbl_ext_thermistor;
> + } else if (strncmp(bat_tech, "LION", 4) == 0) {
> + btype->batres_tbl =
> + temp_to_batres_tbl_9100;
> + } else {
> + btype->batres_tbl =
> + temp_to_batres_tbl_thermistor;
> + }
> + }
> + return 0;
> +}
[...]
> diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
> index bf02225..ff64dd4 100644
> --- a/drivers/power/ab8500_fg.c
> +++ b/drivers/power/ab8500_fg.c
> @@ -22,15 +22,16 @@
> #include <linux/platform_device.h>
> #include <linux/power_supply.h>
> #include <linux/kobject.h>
> -#include <linux/mfd/abx500/ab8500.h>
> -#include <linux/mfd/abx500.h>
> #include <linux/slab.h>
> -#include <linux/mfd/abx500/ab8500-bm.h>
> #include <linux/delay.h>
> -#include <linux/mfd/abx500/ab8500-gpadc.h>
> -#include <linux/mfd/abx500.h>
> #include <linux/time.h>
> +#include <linux/of.h>
> #include <linux/completion.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mfd/abx500.h>
> +#include <linux/mfd/abx500/ab8500.h>
> +#include <linux/mfd/abx500/ab8500-bm.h>
> +#include <linux/mfd/abx500/ab8500-gpadc.h>
>
> #define MILLI_TO_MICRO 1000
> #define FG_LSB_IN_MA 1627
> @@ -212,7 +213,6 @@ struct ab8500_fg {
> struct ab8500_fg_avg_cap avg_cap;
> struct ab8500 *parent;
> struct ab8500_gpadc *gpadc;
> - struct abx500_fg_platform_data *pdata;
> struct abx500_bm_data *bat;
> struct power_supply fg_psy;
> struct workqueue_struct *fg_wq;
> @@ -2416,6 +2416,8 @@ static int __devexit ab8500_fg_remove(struct platform_device *pdev)
> int ret = 0;
> struct ab8500_fg *di = platform_get_drvdata(pdev);
>
> + of_node_put(pdev->dev.of_node);
This is wrong, the probe function doesn't increment the refcount of this
node, so you don't have to decrement it here.
> +
> list_del(&di->node);
>
> /* Disable coulomb counter */
> @@ -2429,7 +2431,6 @@ static int __devexit ab8500_fg_remove(struct platform_device *pdev)
> flush_scheduled_work();
> power_supply_unregister(&di->fg_psy);
> platform_set_drvdata(pdev, NULL);
> - kfree(di);
> return ret;
> }
>
> @@ -2442,21 +2443,44 @@ static struct ab8500_fg_interrupts ab8500_fg_irq[] = {
> {"CCEOC", ab8500_fg_cc_data_end_handler},
> };
>
> +char *supply_interface[] = {
> + "ab8500_chargalg",
> + "ab8500_usb",
> +};
> +
> static int __devinit ab8500_fg_probe(struct platform_device *pdev)
> {
> + struct device_node *np = pdev->dev.of_node;
> + struct ab8500_fg *di;
> int i, irq;
> int ret = 0;
> - struct abx500_bm_plat_data *plat_data = pdev->dev.platform_data;
> - struct ab8500_fg *di;
>
> - if (!plat_data) {
> - dev_err(&pdev->dev, "No platform data\n");
> - return -EINVAL;
> + di = devm_kzalloc(&pdev->dev, sizeof(*di), GFP_KERNEL);
> + if (!di) {
> + dev_err(&pdev->dev, "%s no mem for ab8500_fg\n", __func__);
> + if (np) {
> + ret = -ENOMEM;
> + goto release_node;
Here and below, release_node is wrong for the same reason as I wrote for
the remove function, you don't have to call of_node_put().
> + }
> + }
> + di->bat = (struct abx500_bm_data *)
> + pdev->mfd_cell->platform_data;
No need to cast a void *.
> + if (!di->bat) {
> + if (np) {
> + ret = bmdevs_of_probe(&pdev->dev, np, &di->bat);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "failed to get battery information\n");
> + goto release_node;
> + }
> + } else {
> + dev_err(&pdev->dev, "missing dt node for ab8500_fg\n");
> + ret = -EINVAL;
> + goto release_node;
> + }
> + } else {
> + dev_info(&pdev->dev, "falling back to legacy platform data\n");
> }
> -
> - di = kzalloc(sizeof(*di), GFP_KERNEL);
> - if (!di)
> - return -ENOMEM;
>
> mutex_init(&di->cc_lock);
>
> @@ -2465,29 +2489,13 @@ static int __devinit ab8500_fg_probe(struct platform_device *pdev)
> di->parent = dev_get_drvdata(pdev->dev.parent);
> di->gpadc = ab8500_gpadc_get("ab8500-gpadc.0");
>
> - /* get fg specific platform data */
> - di->pdata = plat_data->fg;
> - if (!di->pdata) {
> - dev_err(di->dev, "no fg platform data supplied\n");
> - ret = -EINVAL;
> - goto free_device_info;
> - }
> -
> - /* get battery specific platform data */
> - di->bat = plat_data->battery;
> - if (!di->bat) {
> - dev_err(di->dev, "no battery platform data supplied\n");
> - ret = -EINVAL;
> - goto free_device_info;
> - }
> -
> di->fg_psy.name = "ab8500_fg";
> di->fg_psy.type = POWER_SUPPLY_TYPE_BATTERY;
> di->fg_psy.properties = ab8500_fg_props;
> di->fg_psy.num_properties = ARRAY_SIZE(ab8500_fg_props);
> di->fg_psy.get_property = ab8500_fg_get_property;
> - di->fg_psy.supplied_to = di->pdata->supplied_to;
> - di->fg_psy.num_supplicants = di->pdata->num_supplicants;
> + di->fg_psy.supplied_to = supply_interface;
> + di->fg_psy.num_supplicants = ARRAY_SIZE(supply_interface),
> di->fg_psy.external_power_changed = ab8500_fg_external_power_changed;
>
> di->bat_cap.max_mah_design = MILLI_TO_MICRO *
> @@ -2506,7 +2514,8 @@ static int __devinit ab8500_fg_probe(struct platform_device *pdev)
> di->fg_wq = create_singlethread_workqueue("ab8500_fg_wq");
> if (di->fg_wq == NULL) {
> dev_err(di->dev, "failed to create work queue\n");
> - goto free_device_info;
> + ret = -ENOMEM;
> + goto release_node;
> }
>
> /* Init work for running the fg algorithm instantly */
> @@ -2605,12 +2614,17 @@ free_irq:
> }
> free_inst_curr_wq:
> destroy_workqueue(di->fg_wq);
> -free_device_info:
> - kfree(di);
>
> +release_node:
> + of_node_put(np);
> return ret;
> }
--
Francesco
^ permalink raw reply
* OMP35xx booting issue
From: Felipe Balbi @ 2012-10-20 15:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAPjKCR9ymWpkUPvXePu5NkGTxVaE2HFv5wp24aGBocdZ6nJFzg@mail.gmail.com>
Hi,
(please don't top-post)
On Sat, Oct 20, 2012 at 12:37:58PM +0530, Anil Kumar wrote:
> devkit8000 is booting with kernel 3.5 and no much diff
> in kernel 3.6/3.5 board files
>
> i am suspecting here
>
> omap_hsmmc omap_hsmmc.0: unable to obtain RX DMA engine channel 62
you need to enable CONFIG_DMADEVICES, CONFIG_ASYNC_TX_DMA and
CONFIG_DMA_OMAP. That should sort it out.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121020/1cd48c59/attachment.sig>
^ permalink raw reply
* [GIT PULL][for 3.8] pull request of serial branch from arch pxa git tree
From: Greg KH @ 2012-10-20 15:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAN1soZzVwMK5_e=tjvuOm_Wf=ybA07O1uL9x_CVU-ATsp7z7Qg@mail.gmail.com>
On Sat, Oct 20, 2012 at 11:27:34PM +0800, Haojian Zhuang wrote:
> Hi Olof & Arnd,
>
> Please help to merge upload/serial branch in arch pxa git tree.
Why not just send me the patch through email so I can take it that way?
thanks,
greg k-h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox