* [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: Joe Perches @ 2012-11-13 20:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121113.144406.1610017702502358739.davem@davemloft.net>
Remove wanrouter as it's obsolete and has not been updated
by sangoma since 2.4.3 or so and it's not used anymore.
Remove obsolete cyclomx drivers.
Update files that include now deleted wanrouter bits.
Signed-off-by: Joe Perches <joe@perches.com>
---
On Tue, 2012-11-13 at 14:44 -0500, David Miller wrote:
> Remove wanrouter as it's obsolete and has not been updated
> > by sangoma since 2.4.3 or so and it's not used anymore.
> >
> > Remove obsolete cyclomx drivers.
> > Update defconfig files that enable wanrouter.
> > Update files that include now deleted wanrouter bits.
> []
> I'm fine with this change, except the arch defconfig bits.
>
> We've been leaving those alone, and letting the arch maintainers
> do the updates themselves periodically.
>
> Please resubmit this with those parts removed.
That seems an odd workflow as it leaves dangling CONFIG_<foo>
options set, but I guess it doesn't hurt so here it is.
I just removed the modified arch/.../<foo>defconfig files.
Documentation/ioctl/ioctl-number.txt | 1 -
Documentation/magic-number.txt | 1 -
Documentation/zh_CN/magic-number.txt | 1 -
drivers/isdn/i4l/isdn_x25iface.c | 1 -
drivers/isdn/i4l/isdn_x25iface.h | 1 -
drivers/net/wan/Kconfig | 54 --
drivers/net/wan/Makefile | 5 -
drivers/net/wan/cycx_drv.c | 569 ------------
drivers/net/wan/cycx_main.c | 346 --------
drivers/net/wan/cycx_x25.c | 1602 ----------------------------------
include/linux/cyclomx.h | 77 --
include/linux/cycx_drv.h | 64 --
include/linux/wanrouter.h | 129 ---
include/uapi/linux/Kbuild | 1 -
include/uapi/linux/wanrouter.h | 452 ----------
net/Kconfig | 1 -
net/Makefile | 1 -
net/socket.c | 1 -
net/wanrouter/Kconfig | 27 -
net/wanrouter/Makefile | 7 -
net/wanrouter/patchlevel | 1 -
net/wanrouter/wanmain.c | 782 -----------------
net/wanrouter/wanproc.c | 380 --------
23 files changed, 0 insertions(+), 4504 deletions(-)
delete mode 100644 drivers/net/wan/cycx_drv.c
delete mode 100644 drivers/net/wan/cycx_main.c
delete mode 100644 drivers/net/wan/cycx_x25.c
delete mode 100644 include/linux/cyclomx.h
delete mode 100644 include/linux/cycx_drv.h
delete mode 100644 include/linux/wanrouter.h
delete mode 100644 include/uapi/linux/wanrouter.h
delete mode 100644 net/wanrouter/Kconfig
delete mode 100644 net/wanrouter/Makefile
delete mode 100644 net/wanrouter/patchlevel
delete mode 100644 net/wanrouter/wanmain.c
delete mode 100644 net/wanrouter/wanproc.c
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 2152b0e..028a034 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -179,7 +179,6 @@ Code Seq#(hex) Include File Comments
'V' C0 media/davinci/vpfe_capture.h conflict!
'V' C0 media/si4713.h conflict!
'W' 00-1F linux/watchdog.h conflict!
-'W' 00-1F linux/wanrouter.h conflict!
'W' 00-3F sound/asound.h conflict!
'X' all fs/xfs/xfs_fs.h conflict!
and fs/xfs/linux-2.6/xfs_ioctl32.h
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 82761a3..0c39e72 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
-ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h
SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index 4263022..51b7e15 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
-ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h
SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
index e2d4e58..d00c86d 100644
--- a/drivers/isdn/i4l/isdn_x25iface.c
+++ b/drivers/isdn/i4l/isdn_x25iface.c
@@ -21,7 +21,6 @@
#include <linux/netdevice.h>
#include <linux/concap.h>
#include <linux/slab.h>
-#include <linux/wanrouter.h>
#include <net/x25device.h>
#include "isdn_x25iface.h"
diff --git a/drivers/isdn/i4l/isdn_x25iface.h b/drivers/isdn/i4l/isdn_x25iface.h
index 0b26e3b..ca08e08 100644
--- a/drivers/isdn/i4l/isdn_x25iface.h
+++ b/drivers/isdn/i4l/isdn_x25iface.h
@@ -19,7 +19,6 @@
#endif
#include <linux/skbuff.h>
-#include <linux/wanrouter.h>
#include <linux/isdn.h>
#include <linux/concap.h>
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index d58431e..0c077b0 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -356,60 +356,6 @@ config SDLA
To compile this driver as a module, choose M here: the
module will be called sdla.
-# Wan router core.
-config WAN_ROUTER_DRIVERS
- tristate "WAN router drivers"
- depends on WAN_ROUTER
- ---help---
- Connect LAN to WAN via Linux box.
-
- Select driver your card and remember to say Y to "Wan Router."
- You will need the wan-tools package which is available from
- <ftp://ftp.sangoma.com/>.
-
- Note that the answer to this question won't directly affect the
- kernel except for how subordinate drivers may be built:
- saying N will just cause the configurator to skip all
- the questions about WAN router drivers.
-
- If unsure, say N.
-
-config CYCLADES_SYNC
- tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
- depends on WAN_ROUTER_DRIVERS && (PCI || ISA)
- ---help---
- Cyclom 2X from Cyclades Corporation <http://www.avocent.com/> is an
- intelligent multiprotocol WAN adapter with data transfer rates up to
- 512 Kbps. These cards support the X.25 and SNA related protocols.
-
- While no documentation is available at this time please grab the
- wanconfig tarball in
- <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
- to make it compile with the current wanrouter include files; efforts
- are being made to use the original package available at
- <ftp://ftp.sangoma.com/>).
-
- Feel free to contact me or the cycsyn-devel mailing list at
- <acme@conectiva.com.br> and <cycsyn-devel@bazar.conectiva.com.br> for
- additional details, I hope to have documentation available as soon as
- possible. (Cyclades Brazil is writing the Documentation).
-
- The next questions will ask you about the protocols you want the
- driver to support (for now only X.25 is supported).
-
- If you have one or more of these cards, say Y to this option.
-
- To compile this driver as a module, choose M here: the
- module will be called cyclomx.
-
-config CYCLOMX_X25
- bool "Cyclom 2X X.25 support (EXPERIMENTAL)"
- depends on CYCLADES_SYNC
- help
- Connect a Cyclom 2X card to an X.25 network.
-
- Enabling X.25 support will enlarge your kernel by about 11 kB.
-
# X.25 network drivers
config LAPBETHER
tristate "LAPB over Ethernet driver (EXPERIMENTAL)"
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index df70248..c135ef4 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -5,10 +5,6 @@
# Rewritten to use lists instead of if-statements.
#
-cyclomx-y := cycx_main.o
-cyclomx-$(CONFIG_CYCLOMX_X25) += cycx_x25.o
-cyclomx-objs := $(cyclomx-y)
-
obj-$(CONFIG_HDLC) += hdlc.o
obj-$(CONFIG_HDLC_RAW) += hdlc_raw.o
obj-$(CONFIG_HDLC_RAW_ETH) += hdlc_raw_eth.o
@@ -28,7 +24,6 @@ obj-$(CONFIG_LANMEDIA) += lmc/
obj-$(CONFIG_DLCI) += dlci.o
obj-$(CONFIG_SDLA) += sdla.o
-obj-$(CONFIG_CYCLADES_SYNC) += cycx_drv.o cyclomx.o
obj-$(CONFIG_LAPBETHER) += lapbether.o
obj-$(CONFIG_SBNI) += sbni.o
obj-$(CONFIG_N2) += n2.o
diff --git a/drivers/net/wan/cycx_drv.c b/drivers/net/wan/cycx_drv.c
deleted file mode 100644
index 2a3ecae..0000000
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
deleted file mode 100644
index 81fbbad..0000000
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
deleted file mode 100644
index 06f3f63..0000000
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
deleted file mode 100644
index b88f7f4..0000000
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
deleted file mode 100644
index 12fe6b0..0000000
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
deleted file mode 100644
index cec4b41..0000000
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index e194387..c54b7e7 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -408,7 +408,6 @@ header-y += virtio_ring.h
header-y += virtio_rng.h
header-y += vt.h
header-y += wait.h
-header-y += wanrouter.h
header-y += watchdog.h
header-y += wimax.h
header-y += wireless.h
diff --git a/include/uapi/linux/wanrouter.h b/include/uapi/linux/wanrouter.h
deleted file mode 100644
index 7617df2..0000000
diff --git a/net/Kconfig b/net/Kconfig
index 30b48f5..4cf4bb5 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -209,7 +209,6 @@ source "net/ipx/Kconfig"
source "drivers/net/appletalk/Kconfig"
source "net/x25/Kconfig"
source "net/lapb/Kconfig"
-source "net/wanrouter/Kconfig"
source "net/phonet/Kconfig"
source "net/ieee802154/Kconfig"
source "net/mac802154/Kconfig"
diff --git a/net/Makefile b/net/Makefile
index 4f4ee08..c5aa8b3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_BRIDGE) += bridge/
obj-$(CONFIG_NET_DSA) += dsa/
obj-$(CONFIG_IPX) += ipx/
obj-$(CONFIG_ATALK) += appletalk/
-obj-$(CONFIG_WAN_ROUTER) += wanrouter/
obj-$(CONFIG_X25) += x25/
obj-$(CONFIG_LAPB) += lapb/
obj-$(CONFIG_NETROM) += netrom/
diff --git a/net/socket.c b/net/socket.c
index 2ca51c7..5c4d82c 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -69,7 +69,6 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/mutex.h>
-#include <linux/wanrouter.h>
#include <linux/if_bridge.h>
#include <linux/if_frad.h>
#include <linux/if_vlan.h>
diff --git a/net/wanrouter/Kconfig b/net/wanrouter/Kconfig
deleted file mode 100644
index a157a2e..0000000
diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile
deleted file mode 100644
index 4da14bc..0000000
diff --git a/net/wanrouter/patchlevel b/net/wanrouter/patchlevel
deleted file mode 100644
index c043eea..0000000
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
deleted file mode 100644
index 2ab7850..0000000
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c
deleted file mode 100644
index c43612e..0000000
--
1.7.8.112.g3fd21
^ permalink raw reply related
* usb clock not found on imx27 when using dt
From: trem @ 2012-11-13 20:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121113073812.GZ10369@pengutronix.de>
On 13/11/12 08:38, s.hauer at pengutronix.de wrote:
>>> Please investigate in using the chipidea driver. This will be the way
>>> forward for i.MX.
>>
>> I use the chipidea driver for the usb.
>>
>> The main issue is that the chipidea driver don't found the clock :
>>
>> [ 0.761693] imx_usb mxc-ehci.0: Failed to get clock, err=-2
>> [ 0.767620] imx_usb: probe of mxc-ehci.0 failed with error -2
>>
>> The driver ci13xxx_imx request the clock in the probe function
>> in the following line:
>> data->clk = devm_clk_get(&pdev->dev, NULL);
>> calling: clk = clk_get(dev, id);
>> calling: clk_get_sys(dev_id, con_id);
>> calling: clk_find(dev_id, con_id);
>> with dev_id = mxc-ehci.0 and con_id = NULL
>> This last function fail to found a clock.
>>
>> In the function mx27_clocks_init, several mxc-ehci.0
>> clocks are registered, but all with a con_id.
>>
>> So the function clk_find fails.
>>
>> As I'm not really sure of the dts, I don't know if the problem
>> is in the dts or in the driver (maybe both).
>
> You have to register the lookups for the chipidea driver with
> clk_register_clkdev(). The lookups are only what the name suggests:
> lookups. They are no clocks by themselves. This means that you have to
> add another lookup which matches the device name.
Thanks for this help, I've added three "clocks" for the chipidea driver :
clk_register_clkdev(clk[usb_div], NULL, "mxc-ehci.0");
And I don't have the missing clock issue, but a kernel panic :
[ 0.679565] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.687807] usbcore: registered new interface driver cdc_acm
[ 0.693503] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 0.702506] usbcore: registered new interface driver usblp
[ 0.708292] Initializing USB Mass Storage driver...
[ 0.713885] usbcore: registered new interface driver usb-storage
[ 0.720190] USB Mass Storage support registered.
[ 0.726361] usbcore: registered new interface driver usbserial
[ 0.732984] usbcore: registered new interface driver ftdi_sio
[ 0.739510] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 0.747708] usbcore: registered new interface driver pl2303
[ 0.754044] usbserial: USB Serial support registered for pl2303
[ 0.762611] Unhandled fault: external abort on non-linefetch (0x008) at 0xf4424100
[ 0.770227] Internal error: : 8 [#1] PREEMPT ARM
[ 0.774861] Modules linked in:
[ 0.777950] CPU: 0 Not tainted (3.7.0-rc5-ge917a67 #2)
[ 0.783469] PC is at ci_hdrc_probe+0xcc/0x430
[ 0.787853] LR is at devm_kzalloc+0x4c/0x64
[ 0.792058] pc : [<c03da658>] lr : [<c023ffa8>] psr: 60000013
[ 0.792058] sp : d3833d98 ip : 40000013 fp : 00000000
[ 0.803550] r10: c054db14 r9 : 00000000 r8 : f4424100
[ 0.808788] r7 : d398c4e0 r6 : d39b1180 r5 : d39b1190 r4 : d3901010
[ 0.815329] r3 : 00000100 r2 : 00000000 r1 : d3901010 r0 : d3901010
[ 0.821871] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 0.829194] Control: 0005317f Table: a0004000 DAC: 00000017
[ 0.834954] Process swapper (pid: 1, stack limit = 0xd38321b8)
[ 0.840799] Stack: (0xd3833d98 to 0xd3834000)
[ 0.845174] 3d80: d39b1198 00000000
[ 0.853384] 3da0: d39b1190 c055ea90 d39b1190 c0545010 c055ea6c c023e574 d39b1190 c023d288
[ 0.861592] 3dc0: d39b1190 d3833dd8 c023d4a4 00000000 c055ea6c c023bb68 d380755c d39cdb74
[ 0.869798] 3de0: d39cda50 d39b11c4 d39b1190 d39b1190 00000000 c023d588 d39b1190 c05367b0
[ 0.878004] 3e00: d39b1190 c023c6a8 d39b1190 d38c99b0 d39b1198 c023b4d0 00000021 00000000
[ 0.886210] 3e20: 00000002 c01e9aac d39b1180 d39b1190 d3832000 d39b1180 d39b1190 00000002
[ 0.894416] 3e40: d38573a0 00000002 d3832000 c054db14 00000000 c023eb6c d39b1180 00000000
[ 0.902622] 3e60: 00000000 d38573a0 00000002 c02b4cb0 ffffffff 00000000 d398c530 d38c99b0
[ 0.910828] 3e80: d38c99a0 d398c530 00000000 00000000 ffffffff c03dac80 d38c99b0 c055ea90
[ 0.919035] 3ea0: d38c99b0 c0545184 c050a32c 0000007a c051c8b8 c023e574 d38c99b0 c023d288
[ 0.927241] 3ec0: d38c99b0 c0545184 d38c99e4 00000000 c050a32c c023d4a0 c0545184 d3833ee8
[ 0.935448] 3ee0: c023d414 c023bbf4 d380754c d38c8d50 c0545184 c0545184 c05367b0 d39cda80
[ 0.943654] 3f00: 00000000 c023c380 c04a6948 d3832000 c0545184 d3832000 c0545184 c054dc00
[ 0.951860] 3f20: 00000000 c023da70 d3832000 00000007 c054dc00 00000000 c050a32c c00087ec
[ 0.960065] 3f40: c04a70ec c04db800 00000006 00000006 00000000 c05147fc 00000006 c05147fc
[ 0.968269] 3f60: 00000007 c054dc00 c0514808 c04f71ac 0000007a c03d7404 00000006 00000006
[ 0.976475] 3f80: c04f71ac 01234567 d3832000 00000000 c03d7314 00000000 00000000 00000000
[ 0.984678] 3fa0: 00000000 00000000 00000000 c0014730 00000000 00000000 00000000 00000000
[ 0.992881] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.001084] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00008000
[ 1.009335] [<c03da658>] (ci_hdrc_probe+0xcc/0x430) from [<c023e574>] (platform_drv_probe+0x14/0x18)
[ 1.018523] [<c023e574>] (platform_drv_probe+0x14/0x18) from [<c023d288>] (driver_probe_device+0x80/0x20c)
[ 1.028221] [<c023d288>] (driver_probe_device+0x80/0x20c) from [<c023bb68>] (bus_for_each_drv+0x64/0x8c)
[ 1.037746] [<c023bb68>] (bus_for_each_drv+0x64/0x8c) from [<c023d588>] (device_attach+0x80/0x98)
[ 1.046660] [<c023d588>] (device_attach+0x80/0x98) from [<c023c6a8>] (bus_probe_device+0x84/0xac)
[ 1.055570] [<c023c6a8>] (bus_probe_device+0x84/0xac) from [<c023b4d0>] (device_add+0x534/0x604)
[ 1.064392] [<c023b4d0>] (device_add+0x534/0x604) from [<c023eb6c>] (platform_device_add+0x134/0x20c)
[ 1.073667] [<c023eb6c>] (platform_device_add+0x134/0x20c) from [<c02b4cb0>] (ci13xxx_add_device+0xd8/0x110)
[ 1.083543] [<c02b4cb0>] (ci13xxx_add_device+0xd8/0x110) from [<c03dac80>] (ci13xxx_imx_probe+0x250/0x304)
[ 1.093246] [<c03dac80>] (ci13xxx_imx_probe+0x250/0x304) from [<c023e574>] (platform_drv_probe+0x14/0x18)
[ 1.102860] [<c023e574>] (platform_drv_probe+0x14/0x18) from [<c023d288>] (driver_probe_device+0x80/0x20c)
[ 1.112557] [<c023d288>] (driver_probe_device+0x80/0x20c) from [<c023d4a0>] (__driver_attach+0x8c/0x90)
[ 1.121991] [<c023d4a0>] (__driver_attach+0x8c/0x90) from [<c023bbf4>] (bus_for_each_dev+0x64/0x8c)
[ 1.131077] [<c023bbf4>] (bus_for_each_dev+0x64/0x8c) from [<c023c380>] (bus_add_driver+0xa0/0x22c)
[ 1.140167] [<c023c380>] (bus_add_driver+0xa0/0x22c) from [<c023da70>] (driver_register+0x78/0x140)
[ 1.149253] [<c023da70>] (driver_register+0x78/0x140) from [<c00087ec>] (do_one_initcall+0x30/0x178)
[ 1.158438] [<c00087ec>] (do_one_initcall+0x30/0x178) from [<c03d7404>] (kernel_init+0xf0/0x294)
[ 1.167277] [<c03d7404>] (kernel_init+0xf0/0x294) from [<c0014730>] (ret_from_fork+0x14/0x24)
[ 1.175833] Code: e584800c e5933004 e0888003 e5848010 (e5d83000)
[ 1.182012] ---[ end trace f1f4ba6255ab3146 ]---
[ 1.187015] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Regards,
Philippe
^ permalink raw reply
* [PATCH v2] Add support for generic BCM SoC chipsets
From: Domenico Andreoli @ 2012-11-13 21:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A28920.7040805@broadcom.com>
On Tue, Nov 13, 2012 at 09:53:36AM -0800, Christian Daudt wrote:
> On 12-11-12 09:15 AM, Stephen Warren wrote:
...
> >I don't really have too strong of a preference. If the eventual intent
> >is for the directory to host all ARM Broadcom SoCs, then mach-bcm seems
> >reasonable.
> >
> Ok, sounds like sticking to mach-bcm has sufficient acks. What I was
> thinking of doing is, once mach-bcm had been introduced, to propose
> to pull in the 476x and 2835 into also, to do some consolidation.
> And have the separate files can keep separate owners - we'd just
> have Kconfig + Makefile shared most likely.
ok also for me
> Or not. Ultimately I don't mind keeping 2835 and 476x as separate
> mach- either. Those are v6 SoCs, and at this point I have no plans
> on working on mobile v6 SoCs, only v7 onwards. So we can also say
> that mach-bcm is for v7+ SoCs and v6 SoCs keep their existing mach-
> dirs for now.
bcm476x is a non-existent directory yet so I'll be happy to switch to
mach-bcm at the next round (*).
thanks,
Domenico
(*) I'm a bit late with it because I've been distracted by a crazy way
to track kernel regressions I'm hacking on. it's an experiment to test
a few ideas: http://filibusta.crema.unimi.it/~cavok/kbts/. early comments
are very welcome.
^ permalink raw reply
* [GIT PULL] ARM: OMAP2+: clock: convert to common clock framework
From: Tony Lindgren @ 2012-11-13 21:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1211131628410.22487@utopia.booyaka.com>
* Paul Walmsley <paul@pwsan.com> [121113 08:51]:
> Hi Tony
>
> The following changes since commit c9d501e5cb0238910337213e12a09127221c35d8:
>
> Merge tag 'omap-cleanup-b2-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.8/cleanup-prcm (2012-11-09 14:13:43 -0800)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/omap-cleanup-c-for-3.8
>
> for you to fetch changes up to f9ae32a74f0242cbef76d9baa10993d707be1714:
>
> ARM: OMAP2+: clock: Cleanup !CONFIG_COMMON_CLK parts (2012-11-12 19:18:51 -0700)
>
> ----------------------------------------------------------------
> Convert the OMAP2+ clock code and data to rely on the common
> clock framework for internal bookkeeping and the driver API.
Thanks pulled into omap-for-v3.8/clock branch. I ended up pulling
it on top of a merge of omap-for-v3.8/cleanup-prcm and omap-for-v3.8/pm
as otherwise it would automatically resolve into a non-booting merge
with the pm branch as the smartreflex clocks were renamed.
Regards,
Tony
-------------- next part --------------
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.7.0-rc2-00159-gd0bc267 (tmlind at muffinssi) (gcc version 4.3.5 (Debian 4.3.5-4) ) #408 SMP Tue Nov 13 10:25:19 PST 2012
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: OMAP Zoom3 board
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 65280
[ 0.000000] free_area_init_node: node 0, pgdat c077a200, node_mem_map c0cd6000
[ 0.000000] Normal zone: 512 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 64768 pages, LIFO batch:15
[ 0.000000] OMAP3630 ES1.0 (l2cache iva sgx neon isp 192mhz_clk )
[ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[ 0.000000] PERCPU: Embedded 9 pages/cpu @c0edc000 s12864 r8192 d15808 u36864
[ 0.000000] pcpu-alloc: s12864 r8192 d15808 u36864 alloc=9*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64768
[ 0.000000] Kernel command line: console=ttyS0,115200n8 root=/dev/nfs ip=dhcp debug earlyprintk break=mount mem=256M
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 255MB = 255MB total
[ 0.000000] Memory: 245664k/245664k available, 16480k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0699be0 (6727 kB)
[ 0.000000] .init : 0xc069a000 - 0xc06ef240 ( 341 kB)
[ 0.000000] .data : 0xc06f0000 - 0xc077cd30 ( 564 kB)
[ 0.000000] .bss : 0xc077cd54 - 0xc0cd586c (5475 kB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[ 0.000000] Total of 96 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
[ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[ 0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3695 kB
[ 0.000000] per task-struct memory footprint: 1152 bytes
[ 0.062255] Calibrating delay loop... 397.57 BogoMIPS (lpj=1554432)
[ 0.129730] pid_max: default: 32768 minimum: 301
[ 0.135162] Security Framework initialized
[ 0.139617] Mount-cache hash table entries: 512
[ 0.149383] CPU: Testing write buffer coherency: ok
[ 0.155456] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.160919] Setting up static identity map for 0x804c01c8 - 0x804c0238
[ 0.170471] Brought up 1 CPUs
[ 0.173614] SMP: Total of 1 processors activated (397.57 BogoMIPS).
[ 0.199127] omap_hwmod: mcbsp2: cannot be enabled for reset (3)
[ 0.208557] pinctrl core: initialized pinctrl subsystem
[ 0.221008] regulator-dummy: no parameters
[ 0.227661] NET: Registered protocol family 16
[ 0.233184] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.242370] omap-gpmc omap-gpmc: GPMC revision 5.0
[ 0.260070] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[ 0.267059] OMAP GPIO hardware version 2.5
[ 0.273895] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[ 0.283050] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[ 0.292480] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[ 0.301574] gpiochip_add: registered GPIOs 128 to 159 on device: gpio
[ 0.310821] gpiochip_add: registered GPIOs 160 to 191 on device: gpio
[ 0.324798] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.340026] error setting wl12xx data: -38
[ 0.355407] _omap_mux_get_by_name: Could not find signal uart4_rx.uart4_rx
[ 0.371459] Reprogramming SDRC clock to 400000000 Hz
[ 0.382690] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.404510] omap-mcbsp.2: alias fck already exists
[ 0.410766] omap-mcbsp.3: alias fck already exists
[ 0.420166] OMAP DMA hardware revision 5.0
[ 0.430084] arm-pmu: alias fck already exists
[ 0.512176] bio: create slab <bio-0> at 0
[ 0.615173] omap-dma-engine omap-dma-engine: OMAP DMA engine driver
[ 0.623229] fixed-dummy: no parameters
[ 0.628784] vwl1271: 1800 mV
[ 0.638183] SCSI subsystem initialized
[ 0.645019] usbcore: registered new interface driver usbfs
[ 0.651611] usbcore: registered new interface driver hub
[ 0.658020] usbcore: registered new device driver usb
[ 0.695648] twl 1-0048: PIH (irq 23) chaining IRQs 338..346
[ 0.702270] twl 1-0048: power (irq 343) chaining IRQs 346..353
[ 0.711517] twl4030_gpio twl4030_gpio: gpio (irq 338) chaining IRQs 354..371
[ 0.719635] gpiochip_find_base: found new base at 238
[ 0.726226] gpiochip_add: registered GPIOs 238 to 255 on device: twl4030
[ 0.734283] gpio_request: gpio-199 (lcd enable) status -517
[ 0.740234] Failed to get LCD_PANEL_ENABLE_GPIO (gpio199).
[ 0.746002] twl4030_gpio twl4030_gpio: setup --> -517
[ 0.755157] VUSB1V5: 1500 mV normal standby
[ 0.762237] VUSB1V8: 1800 mV normal standby
[ 0.769104] VUSB3V1: 3100 mV normal standby
[ 0.779663] twl4030_usb twl4030_usb: HW_CONDITIONS 0xe0/224; link 3
[ 0.792327] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
[ 0.803314] vdd_mpu_iva: 600 <--> 1450 mV normal
[ 0.810638] vdd_core: 600 <--> 1450 mV normal
[ 0.818176] VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
[ 0.827117] VDAC: 1800 mV normal standby
[ 0.833923] VPLL2: 1800 mV normal standby
[ 0.841491] VMMC2: 1850 mV normal standby
[ 0.848663] VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
[ 0.855926] omap_i2c omap_i2c.1: bus 1 rev1.4.0 at 2400 kHz
[ 0.878204] omap_i2c omap_i2c.2: bus 2 rev1.4.0 at 400 kHz
[ 0.893768] omap_i2c omap_i2c.3: bus 3 rev1.4.0 at 400 kHz
[ 0.907775] Switching to clocksource 32k_counter
[ 1.032379] NET: Registered protocol family 2
[ 1.039855] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 1.047668] TCP bind hash table entries: 8192 (order: 6, 294912 bytes)
[ 1.058593] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.065521] TCP: reno registered
[ 1.068939] UDP hash table entries: 256 (order: 2, 20480 bytes)
[ 1.075439] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[ 1.083007] NET: Registered protocol family 1
[ 1.089111] RPC: Registered named UNIX socket transport module.
[ 1.095733] RPC: Registered udp transport module.
[ 1.100646] RPC: Registered tcp transport module.
[ 1.105621] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.112762] usbhs_omap usbhs_omap: xclk60mhsp2_ck set parentfailed error:-38
[ 1.120544] ------------[ cut here ]------------
[ 1.125396] WARNING: at drivers/clk/clk.c:512 __clk_enable+0x98/0xa4()
[ 1.132171] Modules linked in:
[ 1.135406] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 1.145141] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 1.155120] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db4ac>] (__clk_enable+0x98/0xa4)
[ 1.164428] [<c03db4ac>] (__clk_enable+0x98/0xa4) from [<c03db4d8>] (clk_enable+0x20/0x3c)
[ 1.173004] [<c03db4d8>] (clk_enable+0x20/0x3c) from [<c02ef558>] (usbhs_runtime_resume+0x60/0xac)
[ 1.182281] [<c02ef558>] (usbhs_runtime_resume+0x60/0xac) from [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40)
[ 1.192901] [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 1.202972] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df978>] (rpm_resume+0x3c4/0x638)
[ 1.211883] [<c02df978>] (rpm_resume+0x3c4/0x638) from [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68)
[ 1.221252] [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68) from [<c02ef6b4>] (omap_usbhs_init+0x58/0x278)
[ 1.230987] [<c02ef6b4>] (omap_usbhs_init+0x58/0x278) from [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458)
[ 1.240631] [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 1.250457] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 1.259826] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 1.269287] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 1.278900] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 1.288269] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 1.297729] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 1.307189] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c02d7948>] (platform_driver_probe+0x1c/0xa4)
[ 1.317108] [<c02d7948>] (platform_driver_probe+0x1c/0xa4) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 1.326995] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 1.336273] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 1.346008] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 1.355468] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 1.364349] ---[ end trace 316da40a476f7d3c ]---
[ 1.369171] ------------[ cut here ]------------
[ 1.373992] WARNING: at drivers/clk/clk.c:512 __clk_enable+0x98/0xa4()
[ 1.380767] Modules linked in:
[ 1.384033] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 1.393737] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 1.403747] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db4ac>] (__clk_enable+0x98/0xa4)
[ 1.413024] [<c03db4ac>] (__clk_enable+0x98/0xa4) from [<c03db4d8>] (clk_enable+0x20/0x3c)
[ 1.421569] [<c03db4d8>] (clk_enable+0x20/0x3c) from [<c02ef560>] (usbhs_runtime_resume+0x68/0xac)
[ 1.430877] [<c02ef560>] (usbhs_runtime_resume+0x68/0xac) from [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40)
[ 1.441467] [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 1.451568] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df978>] (rpm_resume+0x3c4/0x638)
[ 1.460479] [<c02df978>] (rpm_resume+0x3c4/0x638) from [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68)
[ 1.469848] [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68) from [<c02ef6b4>] (omap_usbhs_init+0x58/0x278)
[ 1.479583] [<c02ef6b4>] (omap_usbhs_init+0x58/0x278) from [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458)
[ 1.489227] [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 1.499023] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 1.508392] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 1.517852] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 1.527496] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 1.536865] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 1.546325] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 1.555755] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c02d7948>] (platform_driver_probe+0x1c/0xa4)
[ 1.565673] [<c02d7948>] (platform_driver_probe+0x1c/0xa4) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 1.575561] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 1.584838] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 1.594573] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 1.604034] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 1.612762] ---[ end trace 316da40a476f7d3d ]---
[ 1.617706] ------------[ cut here ]------------
[ 1.622528] WARNING: at drivers/clk/clk.c:471 clk_disable+0x20/0x34()
[ 1.629211] Modules linked in:
[ 1.632476] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 1.642181] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 1.652191] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db400>] (clk_disable+0x20/0x34)
[ 1.661376] [<c03db400>] (clk_disable+0x20/0x34) from [<c02ef5ec>] (usbhs_runtime_suspend+0x48/0xb8)
[ 1.670837] [<c02ef5ec>] (usbhs_runtime_suspend+0x48/0xb8) from [<c02da56c>] (pm_generic_runtime_suspend+0x30/0x40)
[ 1.681640] [<c02da56c>] (pm_generic_runtime_suspend+0x30/0x40) from [<c002c57c>] (_od_runtime_suspend+0x10/0x2c)
[ 1.692230] [<c002c57c>] (_od_runtime_suspend+0x10/0x2c) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 1.701782] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02deb6c>] (rpm_suspend+0xf0/0x5c8)
[ 1.710723] [<c02deb6c>] (rpm_suspend+0xf0/0x5c8) from [<c02e015c>] (__pm_runtime_suspend+0x64/0x80)
[ 1.720153] [<c02e015c>] (__pm_runtime_suspend+0x64/0x80) from [<c02dab00>] (pm_generic_runtime_idle+0x44/0x4c)
[ 1.730590] [<c02dab00>] (pm_generic_runtime_idle+0x44/0x4c) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 1.740509] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df214>] (rpm_idle+0x164/0x21c)
[ 1.749237] [<c02df214>] (rpm_idle+0x164/0x21c) from [<c02df3ac>] (__pm_runtime_idle+0x64/0x80)
[ 1.758270] [<c02df3ac>] (__pm_runtime_idle+0x64/0x80) from [<c02ef714>] (omap_usbhs_init+0xb8/0x278)
[ 1.767822] [<c02ef714>] (omap_usbhs_init+0xb8/0x278) from [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458)
[ 1.777435] [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 1.787261] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 1.796630] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 1.806091] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 1.815704] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 1.825073] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 1.834533] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 1.843994] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c02d7948>] (platform_driver_probe+0x1c/0xa4)
[ 1.853881] [<c02d7948>] (platform_driver_probe+0x1c/0xa4) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 1.863800] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 1.873077] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 1.882812] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 1.892272] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 1.901000] ---[ end trace 316da40a476f7d3e ]---
[ 1.905822] ------------[ cut here ]------------
[ 1.910644] WARNING: at drivers/clk/clk.c:471 clk_disable+0x20/0x34()
[ 1.917327] Modules linked in:
[ 1.920562] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 1.930267] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 1.940277] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db400>] (clk_disable+0x20/0x34)
[ 1.949462] [<c03db400>] (clk_disable+0x20/0x34) from [<c02ef5f4>] (usbhs_runtime_suspend+0x50/0xb8)
[ 1.958923] [<c02ef5f4>] (usbhs_runtime_suspend+0x50/0xb8) from [<c02da56c>] (pm_generic_runtime_suspend+0x30/0x40)
[ 1.969726] [<c02da56c>] (pm_generic_runtime_suspend+0x30/0x40) from [<c002c57c>] (_od_runtime_suspend+0x10/0x2c)
[ 1.980316] [<c002c57c>] (_od_runtime_suspend+0x10/0x2c) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 1.989868] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02deb6c>] (rpm_suspend+0xf0/0x5c8)
[ 1.998809] [<c02deb6c>] (rpm_suspend+0xf0/0x5c8) from [<c02e015c>] (__pm_runtime_suspend+0x64/0x80)
[ 2.008239] [<c02e015c>] (__pm_runtime_suspend+0x64/0x80) from [<c02dab00>] (pm_generic_runtime_idle+0x44/0x4c)
[ 2.018676] [<c02dab00>] (pm_generic_runtime_idle+0x44/0x4c) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 2.028594] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df214>] (rpm_idle+0x164/0x21c)
[ 2.037322] [<c02df214>] (rpm_idle+0x164/0x21c) from [<c02df3ac>] (__pm_runtime_idle+0x64/0x80)
[ 2.046356] [<c02df3ac>] (__pm_runtime_idle+0x64/0x80) from [<c02ef714>] (omap_usbhs_init+0xb8/0x278)
[ 2.055908] [<c02ef714>] (omap_usbhs_init+0xb8/0x278) from [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458)
[ 2.065521] [<c04aa7c4>] (usbhs_omap_probe+0x2c4/0x458) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 2.075347] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 2.084716] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 2.094177] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 2.103790] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 2.113159] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 2.122619] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 2.132080] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c02d7948>] (platform_driver_probe+0x1c/0xa4)
[ 2.141998] [<c02d7948>] (platform_driver_probe+0x1c/0xa4) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 2.151885] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 2.161163] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 2.170898] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 2.180358] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 2.189086] ---[ end trace 316da40a476f7d3f ]---
[ 2.197967] NetWinder Floating Point Emulator V0.97 (double precision)
[ 2.205230] CPU PMU: probing PMU on CPU 0
[ 2.209594] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[ 2.404052] VFS: Disk quotas dquot_6.5.2
[ 2.408660] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 2.418060] NFS: Registering the id_resolver key type
[ 2.424133] Key type id_resolver registered
[ 2.428527] Key type id_legacy registered
[ 2.432952] jffs2: version 2.2. (NAND) (SUMMARY)
2001-2006 Red Hat, Inc.
[ 2.440979] msgmni has been set to 479
[ 2.448974] io scheduler noop registered
[ 2.453521] io scheduler deadline registered
[ 2.458038] io scheduler cfq registered (default)
[ 2.467285] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.505645] serial8250.0: ttyS0 at MMIO 0x10000000 (irq = 216) is a ST16654
[ 2.513183] console [ttyS0] enabled, bootconsole disabled
[ 2.513183] console [ttyS0] enabled, bootconsole disabled
[ 2.527679] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 88) is a OMAP UART0
[ 2.537017] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 89) is a OMAP UART1
[ 2.545776] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 90) is a OMAP UART2
[ 2.554748] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 96) is a OMAP UART3
[ 2.598327] brd: module loaded
[ 2.622497] loop: module loaded
[ 2.634918] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 2.642333] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-bit), page size: 2048, OOB size: 64
[ 2.653808] Creating 7 MTD partitions on "omap2-nand.0":
[ 2.659210] 0x000000000000-0x000000080000 : "X-Loader-NAND"
[ 2.673370] 0x000000080000-0x0000001c0000 : "U-Boot-NAND"
[ 2.684478] 0x0000001c0000-0x000000200000 : "Boot Env-NAND"
[ 2.695251] 0x000000200000-0x000002000000 : "Kernel-NAND"
[ 2.731567] 0x000002000000-0x00001c000000 : "system"
[ 3.107940] 0x00001c000000-0x00001e000000 : "userdata"
[ 3.145874] 0x00001e000000-0x000020000000 : "cache"
[ 3.184326] OneNAND driver initializing
[ 3.191589] omap-dma-engine omap-dma-engine: allocating channel for 40
[ 3.198547] omap-dma-engine omap-dma-engine: allocating channel for 39
[ 3.215881] smsc911x: Driver version 2008-10-21
[ 3.229461] libphy: smsc911x-mdio: probed
[ 3.234161] smsc911x smsc911x.0 eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=smsc911x-0:01, irq=-1)
[ 3.244873] smsc911x smsc911x.0 eth0: MAC Address: 00:08:ee:03:7d:fb
[ 3.252746] usbcore: registered new interface driver asix
[ 3.258911] usbcore: registered new interface driver cdc_ether
[ 3.265472] usbcore: registered new interface driver smsc95xx
[ 3.271759] usbcore: registered new interface driver net1080
[ 3.278228] usbcore: registered new interface driver cdc_subset
[ 3.284942] usbcore: registered new interface driver zaurus
[ 3.291320] usbcore: registered new interface driver cdc_ncm
[ 3.298767] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.305480] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
[ 3.311950] ehci-omap ehci-omap.0: failed to get ehci port1 regulator
[ 3.318542] ------------[ cut here ]------------
[ 3.323181] WARNING: at drivers/clk/clk.c:512 __clk_enable+0x98/0xa4()
[ 3.329711] Modules linked in:
[ 3.332794] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 3.342224] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 3.351867] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db4ac>] (__clk_enable+0x98/0xa4)
[ 3.360870] [<c03db4ac>] (__clk_enable+0x98/0xa4) from [<c03db4d8>] (clk_enable+0x20/0x3c)
[ 3.369140] [<c03db4d8>] (clk_enable+0x20/0x3c) from [<c02ef558>] (usbhs_runtime_resume+0x60/0xac)
[ 3.378112] [<c02ef558>] (usbhs_runtime_resume+0x60/0xac) from [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40)
[ 3.388397] [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 3.398162] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df978>] (rpm_resume+0x3c4/0x638)
[ 3.406768] [<c02df978>] (rpm_resume+0x3c4/0x638) from [<c02df8d0>] (rpm_resume+0x31c/0x638)
[ 3.415222] [<c02df8d0>] (rpm_resume+0x31c/0x638) from [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68)
[ 3.424285] [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68) from [<c0377020>] (ehci_hcd_omap_probe+0xfc/0x248)
[ 3.434051] [<c0377020>] (ehci_hcd_omap_probe+0xfc/0x248) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 3.443725] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 3.452789] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 3.461914] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 3.471252] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 3.480316] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 3.489440] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 3.498596] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c06c4d7c>] (ehci_hcd_init+0xb0/0xfc)
[ 3.507476] [<c06c4d7c>] (ehci_hcd_init+0xb0/0xfc) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 3.516357] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 3.525329] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 3.534759] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 3.543914] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 3.552337] ---[ end trace 316da40a476f7d40 ]---
[ 3.556976] ------------[ cut here ]------------
[ 3.561584] WARNING: at drivers/clk/clk.c:512 __clk_enable+0x98/0xa4()
[ 3.568115] Modules linked in:
[ 3.571197] [<c001c3b0>] (unwind_backtrace+0x0/0xf4) from [<c004325c>] (warn_slowpath_common+0x4c/0x64)
[ 3.580596] [<c004325c>] (warn_slowpath_common+0x4c/0x64) from [<c0043290>] (warn_slowpath_null+0x1c/0x24)
[ 3.590270] [<c0043290>] (warn_slowpath_null+0x1c/0x24) from [<c03db4ac>] (__clk_enable+0x98/0xa4)
[ 3.599243] [<c03db4ac>] (__clk_enable+0x98/0xa4) from [<c03db4d8>] (clk_enable+0x20/0x3c)
[ 3.607543] [<c03db4d8>] (clk_enable+0x20/0x3c) from [<c02ef560>] (usbhs_runtime_resume+0x68/0xac)
[ 3.616516] [<c02ef560>] (usbhs_runtime_resume+0x68/0xac) from [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40)
[ 3.626770] [<c02da5ac>] (pm_generic_runtime_resume+0x30/0x40) from [<c02de818>] (__rpm_callback+0x60/0x80)
[ 3.636535] [<c02de818>] (__rpm_callback+0x60/0x80) from [<c02df978>] (rpm_resume+0x3c4/0x638)
[ 3.645141] [<c02df978>] (rpm_resume+0x3c4/0x638) from [<c02df8d0>] (rpm_resume+0x31c/0x638)
[ 3.653594] [<c02df8d0>] (rpm_resume+0x31c/0x638) from [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68)
[ 3.662658] [<c02dfecc>] (__pm_runtime_resume+0x4c/0x68) from [<c0377020>] (ehci_hcd_omap_probe+0xfc/0x248)
[ 3.672424] [<c0377020>] (ehci_hcd_omap_probe+0xfc/0x248) from [<c02d7588>] (platform_drv_probe+0x1c/0x24)
[ 3.682098] [<c02d7588>] (platform_drv_probe+0x1c/0x24) from [<c02d6144>] (really_probe+0x60/0x1f4)
[ 3.691131] [<c02d6144>] (really_probe+0x60/0x1f4) from [<c02d630c>] (driver_probe_device+0x34/0x50)
[ 3.700286] [<c02d630c>] (driver_probe_device+0x34/0x50) from [<c02d63bc>] (__driver_attach+0x94/0x98)
[ 3.709594] [<c02d63bc>] (__driver_attach+0x94/0x98) from [<c02d4968>] (bus_for_each_dev+0x60/0x8c)
[ 3.718658] [<c02d4968>] (bus_for_each_dev+0x60/0x8c) from [<c02d5234>] (bus_add_driver+0x18c/0x254)
[ 3.727813] [<c02d5234>] (bus_add_driver+0x18c/0x254) from [<c02d69b4>] (driver_register+0x5c/0x150)
[ 3.736938] [<c02d69b4>] (driver_register+0x5c/0x150) from [<c06c4d7c>] (ehci_hcd_init+0xb0/0xfc)
[ 3.745849] [<c06c4d7c>] (ehci_hcd_init+0xb0/0xfc) from [<c0008868>] (do_one_initcall+0x2c/0x178)
[ 3.754730] [<c0008868>] (do_one_initcall+0x2c/0x178) from [<c069a2a0>] (do_basic_setup+0x94/0xd0)
[ 3.763702] [<c069a2a0>] (do_basic_setup+0x94/0xd0) from [<c069a358>] (kernel_init_freeable+0x7c/0x124)
[ 3.773101] [<c069a358>] (kernel_init_freeable+0x7c/0x124) from [<c04a4f4c>] (kernel_init+0x8/0x1a8)
[ 3.782257] [<c04a4f4c>] (kernel_init+0x8/0x1a8) from [<c0014410>] (ret_from_fork+0x14/0x24)
[ 3.790679] ---[ end trace 316da40a476f7d41 ]---
[ 3.795440] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[ 3.804260] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
INFO: Turning off power...
[01;32m[
[01;33mlinux-2.6] $
[00m
^ permalink raw reply
* [PATCH V3] Add support for generic BCM SoC chipsets
From: Christian Daudt @ 2012-11-13 21:51 UTC (permalink / raw)
To: linux-arm-kernel
In order to start upstreaming Broadcom SoC support, create
a starting hierarchy, arch and dts files.
The first support SoC family that is planned is the
BCM281XX (BCM11130/11140/11351/28145/28155) family of dual A9 mobile
SoC cores.
This code is just the skeleton code for get the machine upstreamed. It
has been made MULTIPLATFORM compatible.
Next steps
----------
Upstream a basic set of drivers - sufficient for a console boot to
ramdisk. These will includer timer, gpio, i2c drivers.
After this basic set, we will proceed with a more comprehensive set
of drivers for the 281XX SoC family.
v2 patch mods
--------
- Remove l2x0_of_init call as there were problems with the code.
A separate patch will be submitted with cache init code
- Rename capri files and refs to bcm281xx-based names
- Add bcm281xx binding doc
- various misc cleanups
v3 patch mods
-------------
- Remove extra #include lines
- Remove remaining references to capri
- dt uart chipset string added
- cleaned up chip # references
Signed-off-by: Christian Daudt <csd@broadcom.com>
---
.../devicetree/bindings/arm/bcm/bcm281xx.txt | 8 ++
arch/arm/Kconfig | 2 +
arch/arm/Makefile | 1 +
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/bcm11351-brt.dts | 30 +++++
arch/arm/boot/dts/bcm281xx.dtsi | 50 +++++++++
arch/arm/configs/bcm_defconfig | 114 ++++++++++++++++++++
arch/arm/mach-bcm/Kconfig | 19 ++++
arch/arm/mach-bcm/Makefile | 13 +++
arch/arm/mach-bcm/board_bcm.c | 57 ++++++++++
10 files changed, 295 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt
create mode 100644 arch/arm/boot/dts/bcm11351-brt.dts
create mode 100644 arch/arm/boot/dts/bcm281xx.dtsi
create mode 100644 arch/arm/configs/bcm_defconfig
create mode 100644 arch/arm/mach-bcm/Kconfig
create mode 100644 arch/arm/mach-bcm/Makefile
create mode 100644 arch/arm/mach-bcm/board_bcm.c
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt b/Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt
new file mode 100644
index 0000000..c47200f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt
@@ -0,0 +1,8 @@
+Broadcom BCM281XX device tree bindings
+-------------------------------------------
+
+Boards with the bcm281xx SoC family shall have the following properties:
+
+Required root node property:
+
+compatible = "bcm,bcm281xx";
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ade7e92..3da77ba 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1022,6 +1022,8 @@ source "arch/arm/mach-mvebu/Kconfig"
source "arch/arm/mach-at91/Kconfig"
+source "arch/arm/mach-bcm/Kconfig"
+
source "arch/arm/mach-clps711x/Kconfig"
source "arch/arm/mach-cns3xxx/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 5f914fc..8523fdb 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -137,6 +137,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
machine-$(CONFIG_ARCH_AT91) += at91
+machine-$(CONFIG_ARCH_BCM) += bcm
machine-$(CONFIG_ARCH_BCM2835) += bcm2835
machine-$(CONFIG_ARCH_CLPS711X) += clps711x
machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f37cf9f..6b3392b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \
usb_a9263.dtb \
usb_a9g20.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb
dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
dove-cubox.dtb \
dove-dove-db.dtb
diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts
new file mode 100644
index 0000000..d9379d0
--- /dev/null
+++ b/arch/arm/boot/dts/bcm11351-brt.dts
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2012 Broadcom Corporation
+ *
+ * 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 Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+
+/include/ "bcm281xx.dtsi"
+
+/ {
+ model = "BCM11351 BRT board";
+ compatible = "bcm,bcm11351-brt", "bcm,bcm281xx";
+
+ memory {
+ reg = <0x80000000 0x40000000>; /* 1 GB */
+ };
+
+ uart at 3e000000 {
+ status = "okay";
+ };
+
+};
diff --git a/arch/arm/boot/dts/bcm281xx.dtsi b/arch/arm/boot/dts/bcm281xx.dtsi
new file mode 100644
index 0000000..6ec9fe4
--- /dev/null
+++ b/arch/arm/boot/dts/bcm281xx.dtsi
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Broadcom Corporation
+ *
+ * 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 Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "BCM281xx SoC";
+ compatible = "bcm,bcm281xx";
+ interrupt-parent = <&gic>;
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ gic: interrupt-controller at 3ff00100 {
+ compatible = "arm,cortex-a9-gic";
+ #interrupt-cells = <3>;
+ #address-cells = <0>;
+ interrupt-controller;
+ reg = <0x3ff01000 0x1000>,
+ <0x3ff00100 0x100>;
+ };
+
+ uart at 3e000000 {
+ compatible = "snps,dw-apb-uart", "bcm,bcm281xx-sw-apb-uart";
+ status = "disabled";
+ reg = <0x3e000000 0x1000>;
+ clock-frequency = <13000000>;
+ interrupts = <0x0 67 0x4>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ };
+
+ L2: l2-cache {
+ compatible = "arm,pl310-cache";
+ reg = <0x3ff20000 0x1000>;
+ cache-unified;
+ cache-level = <2>;
+ };
+};
diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig
new file mode 100644
index 0000000..e3bf2d6
--- /dev/null
+++ b/arch/arm/configs/bcm_defconfig
@@ -0,0 +1,114 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_EFI_PARTITION=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_ARM_ERRATA_743622=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_COMPACTION is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CMDLINE="console=ttyS0,115200n8 mem=128M"
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_BLK_DEV is not set
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_HW_RANDOM=y
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_HWMON is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_USB_SUPPORT is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_FUSE_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_CONFIGFS_FS=y
+# CONFIG_MISC_FILESYSTEMS is not set
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_PRINTK_TIME=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_FTRACE is not set
+CONFIG_DEBUG_LL=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC7=y
+CONFIG_XZ_DEC=y
+CONFIG_AVERAGE=y
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
new file mode 100644
index 0000000..18ae21c
--- /dev/null
+++ b/arch/arm/mach-bcm/Kconfig
@@ -0,0 +1,19 @@
+config ARCH_BCM
+ bool "Broadcom SoC" if ARCH_MULTI_V7
+ depends on MMU
+ select ARCH_REQUIRE_GPIOLIB
+ select ARM_ERRATA_754322
+ select ARM_ERRATA_764369 if SMP
+ select ARM_GIC
+ select CPU_V7
+ select GENERIC_CLOCKEVENTS
+ select GENERIC_GPIO
+ select GENERIC_TIME
+ select GPIO_BCM
+ select SPARSE_IRQ
+ select TICK_ONESHOT
+ help
+ This enables support for system based on Broadcom SoCs.
+ It currently supports the 'BCM281XX' family, which includes
+ BCM11130, BCM1140, BCM11351, BCM28145 and
+ BCM28155 variants.
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
new file mode 100644
index 0000000..bbf4122
--- /dev/null
+++ b/arch/arm/mach-bcm/Makefile
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2012 Broadcom Corporation
+#
+# 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 Free Software Foundation version 2.
+#
+# This program is distributed "as is" WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+obj-$(CONFIG_ARCH_BCM) := board_bcm.o
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
new file mode 100644
index 0000000..c303582
--- /dev/null
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Broadcom Corporation
+ *
+ * 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 Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; 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_irq.h>
+#include <linux/of_platform.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+
+#include <asm/mach/time.h>
+
+static const struct of_device_id irq_match[] = {
+ {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
+ {}
+};
+
+static void timer_init(void)
+{
+}
+
+static struct sys_timer timer = {
+ .init = timer_init,
+};
+
+static void __init init_irq(void)
+{
+ of_irq_init(irq_match);
+}
+
+static void __init board_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL,
+ &platform_bus);
+}
+
+static const char * const bcm281xx_dt_compat[] = { "bcm,bcm281xx", NULL, };
+
+DT_MACHINE_START(BCM281XX_DT, "Broadcom Application Processor")
+ .init_irq = init_irq,
+ .timer = &timer,
+ .init_machine = board_init,
+ .dt_compat = bcm281xx_dt_compat,
+ .handle_irq = gic_handle_irq,
+MACHINE_END
--
1.7.1
^ permalink raw reply related
* [PATCH V2 2/11] time: convert arch_gettimeoffset to a pointer
From: Arnd Bergmann @ 2012-11-13 21:52 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A27FF8.3080905@wwwdotorg.org>
On Tuesday 13 November 2012, Stephen Warren wrote:
> > One last thing to watch out for: If you're trying to build a kernel that
> > mixes clocksource support with get_arch_timeoffset, you'll need to
> > rework the #ifdef in update_wall_time(), since we currently assume with
> > get_arch_timeoffset() that you're using tick + interpolation, so every
> > call to update_wall_time() only moves time forward by one jiffy.
>
> OK. I don't have any immediate plans to do that, although I wouldn't be
> surprised if we (the ARM community in general) end up wanting to do that
> at some point. It all depends on which ARM sub-architectures end up
> getting converted to the multi-platform zImage support I guess.
IIRC the plan is to get rid of ARCH_USES_GETTIMEOFFSET in the long run,
at least on ARM. Certainly for the platforms that are part of
the multiplatform support. The only platforms remaining that currently
use it are:
* gemini
* ebsa110
* ep93xx
* h720x
* rpc
* s3c24xx
* s3c64xx
* s5pc100
* shark
Most of these are actually ARMv4 based and not maintained very actively.
I'm pretty sure we can take care of ep93xx and the samsung platforms,
which are the more active of the above.
Arnd
^ permalink raw reply
* [PATCH 0/2] ARM: OMAP2420: Fix ethernet support
From: Jon Hunter @ 2012-11-13 22:02 UTC (permalink / raw)
To: linux-arm-kernel
Fix ethernet support for OMAP2420 and remove legacy code for ethernet
configuration.
Jon Hunter (2):
ARM: OMAP2420: Fix ethernet support for OMAP2420 H4
ARM: OMAP: Remove debug-devices.c
arch/arm/mach-omap2/board-h4.c | 80 +++++++-----------------------
arch/arm/mach-omap2/debug-devices.h | 9 ----
arch/arm/plat-omap/Makefile | 1 -
arch/arm/plat-omap/debug-devices.c | 93 -----------------------------------
4 files changed, 19 insertions(+), 164 deletions(-)
delete mode 100644 arch/arm/mach-omap2/debug-devices.h
delete mode 100644 arch/arm/plat-omap/debug-devices.c
--
1.7.9.5
^ permalink raw reply
* [PATCH 1/2] ARM: OMAP2420: Fix ethernet support for OMAP2420 H4
From: Jon Hunter @ 2012-11-13 22:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1352844140-11103-1-git-send-email-jon-hunter@ti.com>
Ethernet is not currently working on the OMAP2420 H4 board. In commit
f604931 (ARM: OMAP: abstract debug card setup (smc, leds)) the function
h4_init_smc91x() that initialised the ethernet controller was renamed to
h4_init_debug() but was never called when initialising the board.
Adding a call to h4_init_debug() fixes ethernet support, however,
instead of using the legacy H4 code migrate the H4 to use the
gpmc_smc91x_init() function instead and remove the legacy H4 code.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
arch/arm/mach-omap2/board-h4.c | 80 ++++++++++------------------------------
1 file changed, 19 insertions(+), 61 deletions(-)
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 8d04bf8..2adba9d 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -34,19 +34,16 @@
#include <plat/menelaus.h>
#include <plat/dma.h>
#include <plat/gpmc.h>
-#include "debug-devices.h"
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include "common.h"
+#include "gpmc-smc91x.h"
#include "mux.h"
#include "control.h"
#define H4_FLASH_CS 0
-#define H4_SMC91X_CS 1
-
-#define H4_ETHR_GPIO_IRQ 92
#if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE)
static const uint32_t board_matrix_keys[] = {
@@ -250,71 +247,31 @@ static u32 is_gpmc_muxed(void)
return 0;
}
-static inline void __init h4_init_debug(void)
-{
- int eth_cs;
- unsigned long cs_mem_base;
- unsigned int muxed, rate;
- struct clk *gpmc_fck;
-
- eth_cs = H4_SMC91X_CS;
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
- gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
- if (IS_ERR(gpmc_fck)) {
- WARN_ON(1);
- return;
- }
-
- clk_prepare_enable(gpmc_fck);
- rate = clk_get_rate(gpmc_fck);
- clk_disable_unprepare(gpmc_fck);
- clk_put(gpmc_fck);
+static struct omap_smc91x_platform_data board_smc91x_data = {
+ .cs = 1,
+ .gpio_irq = 92,
+ .flags = GPMC_TIMINGS_SMC91C96 | IORESOURCE_IRQ_LOWLEVEL,
+};
+static void __init board_smc91x_init(void)
+{
if (is_gpmc_muxed())
- muxed = 0x200;
- else
- muxed = 0;
-
- /* Make sure CS1 timings are correct */
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1,
- 0x00011000 | muxed);
-
- if (rate >= 160000000) {
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
- } else if (rate >= 130000000) {
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
- } else {/* rate = 100000000 */
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F);
- gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2);
- }
-
- if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
- printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
- goto out;
- }
+ board_smc91x_data.flags |= GPMC_MUX_ADD_DATA;
- udelay(100);
+ omap_mux_init_gpio(board_smc91x_data.gpio_irq, OMAP_PIN_INPUT);
+ gpmc_smc91x_init(&board_smc91x_data);
+}
- omap_mux_init_gpio(92, 0);
- if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0)
- gpmc_cs_free(eth_cs);
+#else
-out:
- clk_disable_unprepare(gpmc_fck);
- clk_put(gpmc_fck);
+static inline void board_smc91x_init(void)
+{
}
+#endif
+
static void __init h4_init_flash(void)
{
unsigned long base;
@@ -371,6 +328,7 @@ static void __init omap_h4_init(void)
omap_serial_init();
omap_sdrc_init(NULL, NULL);
h4_init_flash();
+ board_smc91x_init();
omap_display_init(&h4_dss_data);
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/2] ARM: OMAP: Remove debug-devices.c
From: Jon Hunter @ 2012-11-13 22:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1352844140-11103-1-git-send-email-jon-hunter@ti.com>
The OMAP2420 H4 board was the only board using the
plat-omap/debug-devices.c code for configuring ethernet support. Now
that OMAP2420 H4 has been migrated to use the generic gpmc code for
configuring ethernet support, the debug-devices.c file is no longer
used and so remove it and its header file.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
arch/arm/mach-omap2/debug-devices.h | 9 ----
arch/arm/plat-omap/Makefile | 1 -
arch/arm/plat-omap/debug-devices.c | 93 -----------------------------------
3 files changed, 103 deletions(-)
delete mode 100644 arch/arm/mach-omap2/debug-devices.h
delete mode 100644 arch/arm/plat-omap/debug-devices.c
diff --git a/arch/arm/mach-omap2/debug-devices.h b/arch/arm/mach-omap2/debug-devices.h
deleted file mode 100644
index a4edbd2..0000000
--- a/arch/arm/mach-omap2/debug-devices.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _OMAP_DEBUG_DEVICES_H
-#define _OMAP_DEBUG_DEVICES_H
-
-#include <linux/types.h>
-
-/* for TI reference platforms sharing the same debug card */
-extern int debug_card_init(u32 addr, unsigned gpio);
-
-#endif
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index dacaee0..1eca088 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -12,7 +12,6 @@ obj- :=
obj-$(CONFIG_ARCH_OMAP2PLUS) += omap_device.o
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
-obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
obj-y += $(i2c-omap-m) $(i2c-omap-y)
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
deleted file mode 100644
index 5a4678e..0000000
--- a/arch/arm/plat-omap/debug-devices.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * linux/arch/arm/plat-omap/debug-devices.c
- *
- * Copyright (C) 2005 Nokia Corporation
- * Modified from mach-omap2/board-h4.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/gpio.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/io.h>
-#include <linux/smc91x.h>
-
-#include <mach/hardware.h>
-#include "../mach-omap2/debug-devices.h"
-
-/* Many OMAP development platforms reuse the same "debug board"; these
- * platforms include H2, H3, H4, and Perseus2.
- */
-
-static struct smc91x_platdata smc91x_info = {
- .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
- .leda = RPC_LED_100_10,
- .ledb = RPC_LED_TX_RX,
-};
-
-static struct resource smc91x_resources[] = {
- [0] = {
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
- },
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = -1,
- .dev = {
- .platform_data = &smc91x_info,
- },
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-
-static struct resource led_resources[] = {
- [0] = {
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device led_device = {
- .name = "omap_dbg_led",
- .id = -1,
- .num_resources = ARRAY_SIZE(led_resources),
- .resource = led_resources,
-};
-
-static struct platform_device *debug_devices[] __initdata = {
- &smc91x_device,
- &led_device,
- /* ps2 kbd + mouse ports */
- /* 4 extra uarts */
- /* 6 input dip switches */
- /* 8 output pins */
-};
-
-int __init debug_card_init(u32 addr, unsigned gpio)
-{
- int status;
-
- smc91x_resources[0].start = addr + 0x300;
- smc91x_resources[0].end = addr + 0x30f;
-
- smc91x_resources[1].start = gpio_to_irq(gpio);
- smc91x_resources[1].end = gpio_to_irq(gpio);
-
- status = gpio_request(gpio, "SMC91x irq");
- if (status < 0) {
- printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio);
- return status;
- }
- gpio_direction_input(gpio);
-
- led_resources[0].start = addr;
- led_resources[0].end = addr + SZ_4K - 1;
-
- return platform_add_devices(debug_devices, ARRAY_SIZE(debug_devices));
-}
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 2/5] clk: Add support for fundamental zynq clks
From: Josh Cartwright @ 2012-11-13 22:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <df95297d-a875-464a-b7a1-c494f2522a43@CO1EHSMHS027.ehs.local>
On Thu, Nov 08, 2012 at 03:28:07PM -0800, Soren Brinkmann wrote:
> One note below:
>
> On Wed, Oct 31, 2012 at 12:58:52PM -0600, Josh Cartwright wrote:
[..]
> > --- /dev/null
> > +++ b/drivers/clk/clk-zynq.c
[..]
> > +struct zynq_periph_clk {
> > + struct clk_hw hw;
> > + struct clk_onecell_data onecell_data;
> > + struct clk *gates[2];
> > + void __iomem *clk_ctrl;
> > + spinlock_t clkact_lock;
> > +};
> > +
> > +#define to_zynq_periph_clk(hw) container_of(hw, struct zynq_periph_clk, hw)
> > +
> > +static const u8 periph_clk_parent_map[] = {
> > + 0, 0, 1, 2
> > +};
> > +#define PERIPH_CLK_CTRL_SRC(x) (periph_clk_parent_map[((x) & 3) >> 4])
>
> I think this should be:
> #define PERIPH_CLK_CTRL_SRC(x) (periph_clk_parent_map[((x) & 0x30) >> 4])
Yes indeed it should be, thanks.
Michal- I'll just be following up with a v3 of this patch instead of
spinning up the whole set to save myself some time. If you'd rather I
spin up the whole set, let me know.
Thanks,
Josh
^ permalink raw reply
* [GIT PULL] ARM: OMAP: DMTIMER fixes
From: Tony Lindgren @ 2012-11-13 22:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A28086.6050500@ti.com>
* Jon Hunter <jon-hunter@ti.com> [121113 09:18]:
> The following changes since commit d308ba50a1234b299a00e63a95e61fdeb2f1a2df:
>
> Merge branch 'omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3' into omap-for-v3.8/dt (2012-11-09 14:58:34 -0800)
>
> are available in the git repository at:
>
>
> git at github.com:jonhunter/linux.git fixes-timer
>
> for you to fetch changes up to b1538832191d59e29b1077e64cf416a7617b45bc:
>
> ARM: OMAP: Remove __omap_dm_timer_set_source function (2012-11-12 16:23:57 -0600)
>
> ----------------------------------------------------------------
> Several fixes for the OMAP DMTIMER driver including ...
> 1. Adding workaround for OMAP3+ errata i103/i767
> 2. Fixing posted mode support
> 3. Spurious interrupts when using match interrupt
> 4. HWMOD fixes for timers
> 5. Unnecessary restoration of read-only registers
> 6. Adds function for disabling timer interrupts
> 7. Fixing timer1 reset for OMAP1
Thanks pulling into omap-for-v3.8/timer.
Regards,
Tony
Thanks pulled into omap-for-v3.8/timer.
^ permalink raw reply
* [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: David Miller @ 2012-11-13 22:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1352837845.12850.3.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Tue, 13 Nov 2012 12:17:25 -0800
> That seems an odd workflow as it leaves dangling CONFIG_<foo>
> options set, but I guess it doesn't hurt so here it is.
As you said it's harmless, and more importantly it avoids
unnecessary conflicts.
> I just removed the modified arch/.../<foo>defconfig files.
Something is not right here:
[davem at drr net-next]$ git am --signoff V2-wanrouter-Remove-it-and-the-drivers-that-depend-on-it.patch
Applying: wanrouter: Remove it and the drivers that depend on it
error: removal patch leaves file contents
error: net/wanrouter/Kconfig: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/Makefile: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/patchlevel: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/wanmain.c: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/wanproc.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_drv.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_main.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_x25.c: patch does not apply
error: removal patch leaves file contents
error: include/linux/cyclomx.h: patch does not apply
error: removal patch leaves file contents
error: include/linux/cycx_drv.h: patch does not apply
error: removal patch leaves file contents
error: include/linux/wanrouter.h: patch does not apply
error: removal patch leaves file contents
error: include/uapi/linux/wanrouter.h: patch does not apply
^ permalink raw reply
* [PATCH 8/8] ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
From: Tony Lindgren @ 2012-11-13 22:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1352830403-1706-9-git-send-email-jon-hunter@ti.com>
* Jon Hunter <jon-hunter@ti.com> [121113 10:15]:
> Move plat/dmtimer.h to plat-omap/dmtimer.h in order to support a single
> zImage for ARM devices.
Let's skip this one for now as it turns out this solution won't
work either for multiplatform without adding nasty hacks to
arch/arm/Makefile to include arch/arm/plat-omap.
Sorry I don't have any real solution in mind other than making
the remaining dmtimer.h users to use Linux generic timer functions,
or pass the dmtimer functions in platform_data for now.
Regards,
Tony
^ permalink raw reply
* [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: Joe Perches @ 2012-11-13 22:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121113.171736.561094209116852795.davem@davemloft.net>
On Tue, 2012-11-13 at 17:17 -0500, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Tue, 13 Nov 2012 12:17:25 -0800
>
> > That seems an odd workflow as it leaves dangling CONFIG_<foo>
> > options set, but I guess it doesn't hurt so here it is.
>
> As you said it's harmless, and more importantly it avoids
> unnecessary conflicts.
>
> > I just removed the modified arch/.../<foo>defconfig files.
>
> Something is not right here:
> [davem at drr net-next]$ git am --signoff V2-wanrouter-Remove-it-and-the-drivers-that-depend-on-it.patch
> Applying: wanrouter: Remove it and the drivers that depend on it
> error: removal patch leaves file contents
> error: net/wanrouter/Kconfig: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/Makefile: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/patchlevel: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/wanmain.c: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/wanproc.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_drv.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_main.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_x25.c: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/cyclomx.h: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/cycx_drv.h: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/wanrouter.h: patch does not apply
> error: removal patch leaves file contents
> error: include/uapi/linux/wanrouter.h: patch does not apply
Right, that is unexpected/odd/interesting.
I was trying to save mailing list bandwidth by reducing
the patch size.
I generated this with
$ git format-patch -M -D
but it doesn't apply here either. :(
Using
$ git format-patch -M
does apply correctly.
It's quite a bit larger though. (120KB vs 14)
I'll send the large patch just to netdev.
Joe
^ permalink raw reply
* [PATCH V2 4/5] arm: mm: Added support for PJ4B cpu and init routines
From: Will Deacon @ 2012-11-13 22:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A26404.9010202@free-electrons.com>
On Tue, Nov 13, 2012 at 03:15:16PM +0000, Gregory CLEMENT wrote:
> > __v7_setup:
> > adr r12, __v7_setup_stack @ the local stack
> > stmia r12, {r0-r5, r7, r9, r11, lr}
> > @@ -342,6 +375,16 @@ __v7_ca9mp_proc_info:
> > .long 0xff0ffff0
> > __v7_proc __v7_ca9mp_setup
> > .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info
> > +
> > + /*
> > + * Marvell PJ4B processor.
> > + */
> > + .type __v7_pj4b_proc_info, #object
> > +__v7_pj4b_proc_info:
> > + .long 0x562f5842
> > + .long 0xffffffff
This mask seems a little excessive -- does your cpuid not contain revision
information? If so, I'm not sure we want to update the code every time there
is a new spin of the same CPU.
Will
^ permalink raw reply
* [PATCH 8/8] ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
From: Jon Hunter @ 2012-11-13 22:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121113222613.GM6801@atomide.com>
On 11/13/2012 04:26 PM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [121113 10:15]:
>> Move plat/dmtimer.h to plat-omap/dmtimer.h in order to support a single
>> zImage for ARM devices.
>
> Let's skip this one for now as it turns out this solution won't
> work either for multiplatform without adding nasty hacks to
> arch/arm/Makefile to include arch/arm/plat-omap.
>
> Sorry I don't have any real solution in mind other than making
> the remaining dmtimer.h users to use Linux generic timer functions,
> or pass the dmtimer functions in platform_data for now.
Ok, no problem. Are you happy with the others?
One thing that we could do, is not include the dmtimer driver in the
multi-platform build for now. I believe that only the dsp/iva/gfx is
using this driver currently.
I believe that there are some issues with building the kernel without
the dmtimer and so I can look into fixing that.
Is there a way to not include dmtimer with multi-platform but still
enable in omap2plus_defconfig? Or are we planning to kill
omap2plus_defconfig too?
Cheers
Jon
^ permalink raw reply
* [PATCH net-next 1/2] ARM: net: bpf_jit_32: add XOR instruction for BPF JIT
From: Mircea Gherzan @ 2012-11-13 23:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121108012828.GA23143@thinkbox>
Am 08.11.2012 02:28, schrieb Daniel Borkmann:
> This patch is a follow-up for patch "filter: add XOR instruction for use
> with X/K" that implements BPF ARM JIT parts for the BPF XOR operation.
>
> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
> Cc: Mircea Gherzan <mgherzan@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/net/bpf_jit_32.c | 15 ++++++++++-----
> arch/arm/net/bpf_jit_32.h | 2 ++
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
> index c641fb6..8be702d 100644
> --- a/arch/arm/net/bpf_jit_32.c
> +++ b/arch/arm/net/bpf_jit_32.c
> @@ -646,6 +646,16 @@ load_ind:
> update_on_xread(ctx);
> emit(ARM_ORR_R(r_A, r_A, r_X), ctx);
> break;
> + case BPF_S_ALU_XOR_K:
> + /* A ^= K; */
> + OP_IMM3(ARM_EOR, r_A, r_A, k, ctx);
> + break;
> + case BPF_S_ANC_ALU_XOR_X:
> + case BPF_S_ALU_XOR_X:
> + /* A ^= X */
> + update_on_xread(ctx);
> + emit(ARM_EOR_R(r_A, r_A, r_X), ctx);
> + break;
> case BPF_S_ALU_AND_K:
> /* A &= K */
> OP_IMM3(ARM_AND, r_A, r_A, k, ctx);
> @@ -762,11 +772,6 @@ b_epilogue:
> update_on_xread(ctx);
> emit(ARM_MOV_R(r_A, r_X), ctx);
> break;
> - case BPF_S_ANC_ALU_XOR_X:
> - /* A ^= X */
> - update_on_xread(ctx);
> - emit(ARM_EOR_R(r_A, r_A, r_X), ctx);
> - break;
> case BPF_S_ANC_PROTOCOL:
> /* A = ntohs(skb->protocol) */
> ctx->seen |= SEEN_SKB;
> diff --git a/arch/arm/net/bpf_jit_32.h b/arch/arm/net/bpf_jit_32.h
> index 7fa2f7d..afb8462 100644
> --- a/arch/arm/net/bpf_jit_32.h
> +++ b/arch/arm/net/bpf_jit_32.h
> @@ -69,6 +69,7 @@
> #define ARM_INST_CMP_I 0x03500000
>
> #define ARM_INST_EOR_R 0x00200000
> +#define ARM_INST_EOR_I 0x02200000
>
> #define ARM_INST_LDRB_I 0x05d00000
> #define ARM_INST_LDRB_R 0x07d00000
> @@ -135,6 +136,7 @@
> #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm)
>
> #define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm)
> +#define ARM_EOR_I(rd, rn, imm) _AL3_I(ARM_INST_EOR, rd, rn, imm)
>
> #define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \
> | (off))
Acked-by: Mircea Gherzan <mgherzan@gmail.com>
^ permalink raw reply
* [PATCH net-next 2/2] ARM: net: bpf_jit_32: add VLAN instructions for BPF JIT
From: Mircea Gherzan @ 2012-11-13 23:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121108013101.GB23143@thinkbox>
Am 08.11.2012 02:31, schrieb Daniel Borkmann:
> This patch is a follow-up for patch "net: filter: add vlan tag access"
> to support the new VLAN_TAG/VLAN_TAG_PRESENT accessors in BPF JIT.
>
> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
> Cc: Mircea Gherzan <mgherzan@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/net/bpf_jit_32.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
> index 8be702d..9af9a69 100644
> --- a/arch/arm/net/bpf_jit_32.c
> +++ b/arch/arm/net/bpf_jit_32.c
> @@ -16,6 +16,7 @@
> #include <linux/netdevice.h>
> #include <linux/string.h>
> #include <linux/slab.h>
> +#include <linux/if_vlan.h>
> #include <asm/cacheflush.h>
> #include <asm/hwcap.h>
>
> @@ -168,6 +169,8 @@ static inline bool is_load_to_a(u16 inst)
> case BPF_S_ANC_MARK:
> case BPF_S_ANC_PROTOCOL:
> case BPF_S_ANC_RXHASH:
> + case BPF_S_ANC_VLAN_TAG:
> + case BPF_S_ANC_VLAN_TAG_PRESENT:
> case BPF_S_ANC_QUEUE:
> return true;
> default:
> @@ -815,6 +818,17 @@ b_epilogue:
> off = offsetof(struct sk_buff, rxhash);
> emit(ARM_LDR_I(r_A, r_skb, off), ctx);
> break;
> + case BPF_S_ANC_VLAN_TAG:
> + case BPF_S_ANC_VLAN_TAG_PRESENT:
> + ctx->seen |= SEEN_SKB;
> + BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
> + off = offsetof(struct sk_buff, vlan_tci);
> + emit(ARM_LDRH_I(r_A, r_skb, off), ctx);
> + if (inst->code == BPF_S_ANC_VLAN_TAG)
> + OP_IMM3(ARM_AND, r_A, r_A, VLAN_VID_MASK, ctx);
> + else
> + OP_IMM3(ARM_AND, r_A, r_A, VLAN_TAG_PRESENT, ctx);
> + break;
> case BPF_S_ANC_QUEUE:
> ctx->seen |= SEEN_SKB;
> BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
Acked-by: Mircea Gherzan <mgherzan@gmail.com>
^ permalink raw reply
* [PATCH v6 2/7] net: mvneta: driver for Marvell Armada 370/XP network unit
From: Francois Romieu @ 2012-11-13 23:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1352818843-4457-3-git-send-email-thomas.petazzoni@free-electrons.com>
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> :
[...]
> +static int mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr,
> + int queue)
> +{
> + unsigned int mac_h;
> + unsigned int mac_l;
> +
> + if (queue >= 1) {
> + netdev_err(pp->dev, "RX queue #%d is out of range\n", queue);
> + return -EINVAL;
> + }
(whence q <= 0)
> +
> + if (queue != -1) {
> + mac_l = (addr[4] << 8) | (addr[5]);
> + mac_h = (addr[0] << 24) | (addr[1] << 16) |
> + (addr[2] << 8) | (addr[3] << 0);
> +
> + mvreg_write(pp, MVNETA_MAC_ADDR_LOW, mac_l);
> + mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, mac_h);
> + }
What is it trying to achieve with the "queue" argument ?
[...]
> +/* Refill processing */
> +static int mvneta_rx_refill(struct mvneta_port *pp,
> + struct mvneta_rx_desc *rx_desc)
> +
> +{
> + dma_addr_t phys_addr;
> + struct sk_buff *skb;
> +
> + skb = netdev_alloc_skb(pp->dev, pp->pkt_size);
> + if (!skb)
> + return -ENOMEM;
Could netdev_alloc_skb_ip_align be an option ?
[...]
> +static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
> + struct mvneta_rx_queue *rxq)
> +{
> + struct net_device *dev = pp->dev;
> + int rx_done, rx_filled;
> +
> + /* Get number of received packets */
> + rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq);
> +
> + if (rx_todo > rx_done)
> + rx_todo = rx_done;
> +
> + rx_done = 0;
> + rx_filled = 0;
> +
> + /* Fairness NAPI loop */
> + while (rx_done < rx_todo) {
> + struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
> + struct sk_buff *skb;
> + u32 rx_status;
> + int rx_bytes, err;
> +
> + prefetch(rx_desc);
> + rx_done++;
> + rx_filled++;
> + rx_status = rx_desc->status;
> + skb = (struct sk_buff *)rx_desc->buf_cookie;
> +
> + if (!mvneta_rxq_desc_is_first_last(rx_desc) ||
> + (rx_status & MVNETA_RXD_ERR_SUMMARY)) {
> + dev->stats.rx_errors++;
> + mvneta_rx_error(pp, rx_desc);
> + mvneta_rx_desc_fill(rx_desc, rx_desc->buf_phys_addr,
> + (u32)skb);
> + continue;
> + }
> +
> + dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr,
> + rx_desc->data_size, DMA_FROM_DEVICE);
> +
> + rx_bytes = rx_desc->data_size -
> + (MVNETA_ETH_CRC_SIZE + MVNETA_MH_SIZE);
> + u64_stats_update_begin(&pp->rx_stats.syncp);
> + pp->rx_stats.packets++;
> + pp->rx_stats.bytes += rx_bytes;
> + u64_stats_update_end(&pp->rx_stats.syncp);
> +
> + /* Linux processing */
> + skb_reserve(skb, MVNETA_MH_SIZE);
> + skb_put(skb, rx_bytes);
(I suggested to use skb_reserve / skb_put instead of hand-crafted code but
I may have ignored the elephant in the living room)
I understand the skb_put, ok. What is the purpose of the skb_reserve ?
Are MVNETA_ETH_CRC_SIZE (4) and MVNETA_MH_SIZE (2) really different from
ETH_FCS_LEN and NET_IP_ALIGN ?
[...]
> +static irqreturn_t mvneta_isr(int irq, void *dev_id)
> +{
> + struct mvneta_port *pp = (struct mvneta_port *)dev_id;
> +
> + /* Mask all interrupts */
> + mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0);
> +
> + /* Verify that the device not already on the polling list */
> + if (napi_schedule_prep(&pp->napi))
> + __napi_schedule(&pp->napi);
Hand-crafted napi_schedule.
[...]
> +static int mvneta_open(struct net_device *dev)
> +{
> + struct mvneta_port *pp = netdev_priv(dev);
> + int ret;
> +
> + ret = mvneta_mac_addr_set(pp, dev->dev_addr, rxq_def);
> + if (ret < 0) {
> + netdev_err(dev, "mvneta_mac_addr_set failed\n");
> + goto mac_addr_set_failure;
> + }
AFAIU mvneta_mac_addr_set can only fail when (module parameter) rxq_def is
not set correctly. It imho calls for a check in probe/remove and a removal
of the failure case in mvneta_mac_addr_set.
> +
> + pp->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu);
> +
> + ret = mvneta_setup_rxqs(pp);
> + if (ret)
> + goto rxqs_setup_failure;
> +
> + ret = mvneta_setup_txqs(pp);
> + if (ret)
> + goto txqs_setup_failure;
> +
> + /* Connect to port interrupt line */
> + ret = request_irq(pp->dev->irq, mvneta_isr, IRQF_DISABLED,
> + MVNETA_DRIVER_NAME, pp);
include/linux/interrupt.h
[...]
* IRQF_DISABLED - keep irqs disabled when calling the action handler.
* DEPRECATED. This flag is a NOOP and scheduled to be removed
[...]
> +static int __devinit mvneta_probe(struct platform_device *pdev)
> +{
> + const struct mbus_dram_target_info *dram_target_info;
> + struct device_node *dn = pdev->dev.of_node;
> + struct device_node *phy_node;
> + u32 phy_addr, clk_rate_hz;
> + struct mvneta_port *pp;
> + struct net_device *dev;
> + const char *mac_addr;
> + int phy_mode;
> + int err;
> +
> + dev = alloc_etherdev_mq(sizeof(struct mvneta_port), 8);
> + if (!dev)
> + return -ENOMEM;
> +
> + dev->irq = irq_of_parse_and_map(dn, 0);
> + if (dev->irq == 0) {
> + err = -EINVAL;
> + goto err_irq;
> + }
> +
> + phy_node = of_parse_phandle(dn, "phy", 0);
> + if (!phy_node) {
> + dev_err(&pdev->dev, "no associated PHY\n");
> + err = -ENODEV;
> + goto err_node;
> + }
> +
> + phy_mode = of_get_phy_mode(dn);
> + if (phy_mode < 0) {
> + dev_err(&pdev->dev, "incorrect phy-mode\n");
> + err = -EINVAL;
> + goto err_node;
> + }
> +
> + if (of_property_read_u32(dn, "clock-frequency", &clk_rate_hz) != 0) {
> + dev_err(&pdev->dev, "could not read clock-frequency\n");
> + err = -EINVAL;
> + goto err_node;
> + }
> +
> + mac_addr = of_get_mac_address(dn);
> +
> + if (!mac_addr || !is_valid_ether_addr(mac_addr))
> + eth_hw_addr_random(dev);
> + else
> + memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
> +
> + dev->tx_queue_len = MVNETA_MAX_TXD;
> + dev->watchdog_timeo = 5 * HZ;
> + dev->netdev_ops = &mvneta_netdev_ops;
> +
> + SET_ETHTOOL_OPS(dev, &mvneta_eth_tool_ops);
> +
> + pp = netdev_priv(dev);
> +
> + pp->tx_done_timer.function = mvneta_tx_done_timer_callback;
> + init_timer(&pp->tx_done_timer);
> + clear_bit(MVNETA_F_TX_DONE_TIMER_BIT, &pp->flags);
> +
> + pp->weight = MVNETA_RX_POLL_WEIGHT;
> + pp->clk_rate_hz = clk_rate_hz;
> + pp->phy_node = phy_node;
> + pp->phy_interface = phy_mode;
> +
> + pp->base = of_iomap(dn, 0);
> + if (pp->base == NULL) {
> + err = -ENOMEM;
> + goto err_node;
> + }
> +
> + pp->tx_done_timer.data = (unsigned long)dev;
> +
> + pp->tx_ring_size = MVNETA_MAX_TXD;
> + pp->rx_ring_size = MVNETA_MAX_RXD;
> +
> + pp->dev = dev;
> + SET_NETDEV_DEV(dev, &pdev->dev);
> +
> + if (mvneta_init(pp, phy_addr)) {
> + dev_err(&pdev->dev, "can't init eth hal\n");
> + err = -ENODEV;
> + goto err_base;
> + }
The error code from mvneta_init() should be used.
> + mvneta_port_power_up(pp, phy_mode);
> +
> + dram_target_info = mv_mbus_dram_info();
> + if (dram_target_info)
> + mvneta_conf_mbus_windows(pp, dram_target_info);
> +
> + netif_napi_add(dev, &pp->napi, mvneta_poll, pp->weight);
> +
> + if (register_netdev(dev)) {
> + dev_err(&pdev->dev, "failed to register\n");
> + err = ENOMEM;
> + goto err_base;
> + }
- The error code from register_netdev() should be used.
- Leak: allocations in mvneta_init() are not balanced.
- Nit: the "err_where_did_it_trigger_first" style of label shows its
downside when compared to the "err_what_should_be_done" when
it gets used several times.
> +
> + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
> + dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM;
> + dev->priv_flags |= IFF_UNICAST_FLT;
> +
> + dev_info(&pdev->dev, "%s, mac: %pM\n", dev->name,
> + dev->dev_addr);
> +
> + platform_set_drvdata(pdev, pp->dev);
> +
> + return 0;
> +err_base:
> + iounmap(pp->base);
> +err_node:
> + irq_dispose_mapping(dev->irq);
> +err_irq:
> + free_netdev(dev);
> + return err;
> +}
> +
> +/* Device removal routine */
> +static int __devexit mvneta_remove(struct platform_device *pdev)
> +{
> + struct net_device *dev = platform_get_drvdata(pdev);
> + struct mvneta_port *pp = netdev_priv(dev);
> +
> + iounmap(pp->base);
> +
> + unregister_netdev(dev);
> + irq_dispose_mapping(dev->irq);
> + free_netdev(dev);
> + mvneta_deinit(pp);
One may expect the same ordering as the mvneta_probe unroll sequence.
--
Ueimor
^ permalink raw reply
* [PATCH net-next 1/2] ARM: net: bpf_jit_32: add XOR instruction for BPF JIT
From: David Miller @ 2012-11-13 23:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A2D0F4.3090202@gmail.com>
From: Mircea Gherzan <mgherzan@gmail.com>
Date: Wed, 14 Nov 2012 00:00:04 +0100
> Am 08.11.2012 02:28, schrieb Daniel Borkmann:
>> This patch is a follow-up for patch "filter: add XOR instruction for use
>> with X/K" that implements BPF ARM JIT parts for the BPF XOR operation.
>>
>> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
...
> Acked-by: Mircea Gherzan <mgherzan@gmail.com>
Applied, thanks for reviewing.
^ permalink raw reply
* [PATCH net-next 2/2] ARM: net: bpf_jit_32: add VLAN instructions for BPF JIT
From: David Miller @ 2012-11-13 23:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A2D114.8080306@gmail.com>
From: Mircea Gherzan <mgherzan@gmail.com>
Date: Wed, 14 Nov 2012 00:00:36 +0100
> Am 08.11.2012 02:31, schrieb Daniel Borkmann:
>> This patch is a follow-up for patch "net: filter: add vlan tag access"
>> to support the new VLAN_TAG/VLAN_TAG_PRESENT accessors in BPF JIT.
>>
>> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
...
> Acked-by: Mircea Gherzan <mgherzan@gmail.com>
Applied, thanks again.
^ permalink raw reply
* [PATCH v3] clk: Add support for fundamental zynq clks
From: Josh Cartwright @ 2012-11-13 23:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <df95297d-a875-464a-b7a1-c494f2522a43@CO1EHSMHS027.ehs.local>
Provide simplified models for the necessary clocks on the zynq-7000
platform. Currently, the PLLs, the CPU clock network, and the basic
peripheral clock networks (for SDIO, SMC, SPI, QSPI, UART) are modelled.
OF bindings are also provided and documented.
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
---
Michal-
Here is a v3 with a fix for the problem Soren Brinkmann spotted. Am I
correct that your current plan is to merge this into your tree?
If so:
Mike-
Can we get your Acked-by on this one?
Thanks,
Josh
v3: - Fix PERIPH_CLK_CTRL_SRC macro (thanks to Soren Brinkmann)
.../devicetree/bindings/clock/zynq-7000.txt | 55 +++
drivers/clk/clk-zynq.c | 383 +++++++++++++++++++++
include/linux/clk/zynq.h | 24 ++
3 files changed, 462 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/zynq-7000.txt
create mode 100644 drivers/clk/clk-zynq.c
create mode 100644 include/linux/clk/zynq.h
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt
new file mode 100644
index 0000000..23ae1db
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
@@ -0,0 +1,55 @@
+Device Tree Clock bindings for the Zynq 7000 EPP
+
+The Zynq EPP has several different clk providers, each with there own bindings.
+The purpose of this document is to document their usage.
+
+See clock_bindings.txt for more information on the generic clock bindings.
+See Chapter 25 of Zynq TRM for more information about Zynq clocks.
+
+== PLLs ==
+
+Used to describe the ARM_PLL, DDR_PLL, and IO_PLL.
+
+Required properties:
+- #clock-cells : shall be 0 (only one clock is output from this node)
+- compatible : "xlnx,zynq-pll"
+- reg : pair of u32 values, which are the address offsets within the SLCR
+ of the relevant PLL_CTRL register and PLL_CFG register respectively
+- clocks : phandle for parent clock. should be the phandle for ps_clk
+
+Optional properties:
+- clock-output-names : name of the output clock
+
+Example:
+ armpll: armpll {
+ #clock-cells = <0>;
+ compatible = "xlnx,zynq-pll";
+ clocks = <&ps_clk>;
+ reg = <0x100 0x110>;
+ clock-output-names = "armpll";
+ };
+
+== Peripheral clocks ==
+
+Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks.
+
+Required properties:
+- #clock-cells : shall be 1
+- compatible : "xlnx,zynq-periph-clock"
+- reg : a single u32 value, describing the offset within the SLCR where
+ the CLK_CTRL register is found for this peripheral
+- clocks : phandle for parent clocks. should hold phandles for
+ the IO_PLL, ARM_PLL, and DDR_PLL in order
+- clock-output-names : names of the output clock(s). For peripherals that have
+ two output clocks (for example, the UART), two clocks
+ should be listed.
+
+Example:
+ uart_clk: uart_clk {
+ #clock-cells = <1>;
+ compatible = "xlnx,zynq-periph-clock";
+ clocks = <&iopll &armpll &ddrpll>;
+ reg = <0x154>;
+ clock-output-names = "uart0_ref_clk",
+ "uart1_ref_clk";
+ };
diff --git a/drivers/clk/clk-zynq.c b/drivers/clk/clk-zynq.c
new file mode 100644
index 0000000..37a3051
--- /dev/null
+++ b/drivers/clk/clk-zynq.c
@@ -0,0 +1,383 @@
+/*
+ * Copyright (c) 2012 National Instruments
+ *
+ * Josh Cartwright <josh.cartwright@ni.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/slab.h>
+#include <linux/kernel.h>
+#include <linux/clk-provider.h>
+
+static void __iomem *slcr_base;
+
+struct zynq_pll_clk {
+ struct clk_hw hw;
+ void __iomem *pll_ctrl;
+ void __iomem *pll_cfg;
+};
+
+#define to_zynq_pll_clk(hw) container_of(hw, struct zynq_pll_clk, hw)
+
+#define CTRL_PLL_FDIV(x) ((x) >> 12)
+
+static unsigned long zynq_pll_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate)
+{
+ struct zynq_pll_clk *pll = to_zynq_pll_clk(hw);
+ return parent_rate * CTRL_PLL_FDIV(ioread32(pll->pll_ctrl));
+}
+
+static const struct clk_ops zynq_pll_clk_ops = {
+ .recalc_rate = zynq_pll_recalc_rate,
+};
+
+static void __init zynq_pll_clk_setup(struct device_node *np)
+{
+ struct clk_init_data init;
+ struct zynq_pll_clk *pll;
+ const char *parent_name;
+ struct clk *clk;
+ u32 regs[2];
+ int ret;
+
+ ret = of_property_read_u32_array(np, "reg", regs, ARRAY_SIZE(regs));
+ if (WARN_ON(ret))
+ return;
+
+ pll = kzalloc(sizeof(*pll), GFP_KERNEL);
+ if (WARN_ON(!pll))
+ return;
+
+ pll->pll_ctrl = slcr_base + regs[0];
+ pll->pll_cfg = slcr_base + regs[1];
+
+ of_property_read_string(np, "clock-output-names", &init.name);
+
+ init.ops = &zynq_pll_clk_ops;
+ parent_name = of_clk_get_parent_name(np, 0);
+ init.parent_names = &parent_name;
+ init.num_parents = 1;
+
+ pll->hw.init = &init;
+
+ clk = clk_register(NULL, &pll->hw);
+ if (WARN_ON(IS_ERR(clk)))
+ return;
+
+ ret = of_clk_add_provider(np, of_clk_src_simple_get, clk);
+ if (WARN_ON(ret))
+ return;
+}
+
+struct zynq_periph_clk {
+ struct clk_hw hw;
+ struct clk_onecell_data onecell_data;
+ struct clk *gates[2];
+ void __iomem *clk_ctrl;
+ spinlock_t clkact_lock;
+};
+
+#define to_zynq_periph_clk(hw) container_of(hw, struct zynq_periph_clk, hw)
+
+static const u8 periph_clk_parent_map[] = {
+ 0, 0, 1, 2
+};
+#define PERIPH_CLK_CTRL_SRC(x) (periph_clk_parent_map[((x) & 0x30) >> 4])
+#define PERIPH_CLK_CTRL_DIV(x) (((x) & 0x3F00) >> 8)
+
+static unsigned long zynq_periph_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate)
+{
+ struct zynq_periph_clk *periph = to_zynq_periph_clk(hw);
+ return parent_rate / PERIPH_CLK_CTRL_DIV(ioread32(periph->clk_ctrl));
+}
+
+static u8 zynq_periph_get_parent(struct clk_hw *hw)
+{
+ struct zynq_periph_clk *periph = to_zynq_periph_clk(hw);
+ return PERIPH_CLK_CTRL_SRC(ioread32(periph->clk_ctrl));
+}
+
+static const struct clk_ops zynq_periph_clk_ops = {
+ .recalc_rate = zynq_periph_recalc_rate,
+ .get_parent = zynq_periph_get_parent,
+};
+
+static void __init zynq_periph_clk_setup(struct device_node *np)
+{
+ struct zynq_periph_clk *periph;
+ const char *parent_names[3];
+ struct clk_init_data init;
+ int clk_num = 0, err;
+ const char *name;
+ struct clk *clk;
+ u32 reg;
+ int i;
+
+ err = of_property_read_u32(np, "reg", ®);
+ if (WARN_ON(err))
+ return;
+
+ periph = kzalloc(sizeof(*periph), GFP_KERNEL);
+ if (WARN_ON(!periph))
+ return;
+
+ periph->clk_ctrl = slcr_base + reg;
+ spin_lock_init(&periph->clkact_lock);
+
+ init.name = np->name;
+ init.ops = &zynq_periph_clk_ops;
+ for (i = 0; i < ARRAY_SIZE(parent_names); i++)
+ parent_names[i] = of_clk_get_parent_name(np, i);
+ init.parent_names = parent_names;
+ init.num_parents = ARRAY_SIZE(parent_names);
+
+ periph->hw.init = &init;
+
+ clk = clk_register(NULL, &periph->hw);
+ if (WARN_ON(IS_ERR(clk)))
+ return;
+
+ err = of_clk_add_provider(np, of_clk_src_simple_get, clk);
+ if (WARN_ON(err))
+ return;
+
+ err = of_property_read_string_index(np, "clock-output-names", 0,
+ &name);
+ if (WARN_ON(err))
+ return;
+
+ periph->gates[0] = clk_register_gate(NULL, name, np->name, 0,
+ periph->clk_ctrl, 0, 0,
+ &periph->clkact_lock);
+ if (WARN_ON(IS_ERR(periph->gates[0])))
+ return;
+ clk_num++;
+
+ /* some periph clks have 2 downstream gates */
+ err = of_property_read_string_index(np, "clock-output-names", 1,
+ &name);
+ if (err != -ENODATA) {
+ periph->gates[1] = clk_register_gate(NULL, name, np->name, 0,
+ periph->clk_ctrl, 1, 0,
+ &periph->clkact_lock);
+ if (WARN_ON(IS_ERR(periph->gates[1])))
+ return;
+ clk_num++;
+ }
+
+ periph->onecell_data.clks = periph->gates;
+ periph->onecell_data.clk_num = clk_num;
+
+ err = of_clk_add_provider(np, of_clk_src_onecell_get,
+ &periph->onecell_data);
+ if (WARN_ON(err))
+ return;
+}
+
+/* CPU Clock domain is modelled as a mux with 4 children subclks, whose
+ * derivative rates depend on CLK_621_TRUE
+ */
+
+struct zynq_cpu_clk {
+ struct clk_hw hw;
+ struct clk_onecell_data onecell_data;
+ struct clk *subclks[4];
+ void __iomem *clk_ctrl;
+ spinlock_t clkact_lock;
+};
+
+#define to_zynq_cpu_clk(hw) container_of(hw, struct zynq_cpu_clk, hw)
+
+static const u8 zynq_cpu_clk_parent_map[] = {
+ 1, 1, 2, 0
+};
+#define CPU_CLK_SRCSEL(x) (zynq_cpu_clk_parent_map[(((x) & 0x30) >> 4)])
+#define CPU_CLK_CTRL_DIV(x) (((x) & 0x3F00) >> 8)
+
+static u8 zynq_cpu_clk_get_parent(struct clk_hw *hw)
+{
+ struct zynq_cpu_clk *cpuclk = to_zynq_cpu_clk(hw);
+ return CPU_CLK_SRCSEL(ioread32(cpuclk->clk_ctrl));
+}
+
+static unsigned long zynq_cpu_clk_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate)
+{
+ struct zynq_cpu_clk *cpuclk = to_zynq_cpu_clk(hw);
+ return parent_rate / CPU_CLK_CTRL_DIV(ioread32(cpuclk->clk_ctrl));
+}
+
+static const struct clk_ops zynq_cpu_clk_ops = {
+ .get_parent = zynq_cpu_clk_get_parent,
+ .recalc_rate = zynq_cpu_clk_recalc_rate,
+};
+
+struct zynq_cpu_subclk {
+ struct clk_hw hw;
+ void __iomem *clk_621;
+ enum {
+ CPU_SUBCLK_6X4X,
+ CPU_SUBCLK_3X2X,
+ CPU_SUBCLK_2X,
+ CPU_SUBCLK_1X,
+ } which;
+};
+
+#define CLK_621_TRUE(x) ((x) & 1)
+
+#define to_zynq_cpu_subclk(hw) container_of(hw, struct zynq_cpu_subclk, hw);
+
+static unsigned long zynq_cpu_subclk_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate)
+{
+ unsigned long uninitialized_var(rate);
+ struct zynq_cpu_subclk *subclk;
+ bool is_621;
+
+ subclk = to_zynq_cpu_subclk(hw)
+ is_621 = CLK_621_TRUE(ioread32(subclk->clk_621));
+
+ switch (subclk->which) {
+ case CPU_SUBCLK_6X4X:
+ rate = parent_rate;
+ break;
+ case CPU_SUBCLK_3X2X:
+ rate = parent_rate / 2;
+ break;
+ case CPU_SUBCLK_2X:
+ rate = parent_rate / (is_621 ? 3 : 2);
+ break;
+ case CPU_SUBCLK_1X:
+ rate = parent_rate / (is_621 ? 6 : 4);
+ break;
+ };
+
+ return rate;
+}
+
+static const struct clk_ops zynq_cpu_subclk_ops = {
+ .recalc_rate = zynq_cpu_subclk_recalc_rate,
+};
+
+static struct clk *zynq_cpu_subclk_setup(struct device_node *np, u8 which,
+ void __iomem *clk_621)
+{
+ struct zynq_cpu_subclk *subclk;
+ struct clk_init_data init;
+ struct clk *clk;
+ int err;
+
+ err = of_property_read_string_index(np, "clock-output-names",
+ which, &init.name);
+ if (WARN_ON(err))
+ goto err_read_output_name;
+
+ subclk = kzalloc(sizeof(*subclk), GFP_KERNEL);
+ if (!subclk)
+ goto err_subclk_alloc;
+
+ subclk->clk_621 = clk_621;
+ subclk->which = which;
+
+ init.ops = &zynq_cpu_subclk_ops;
+ init.parent_names = &np->name;
+ init.num_parents = 1;
+
+ subclk->hw.init = &init;
+
+ clk = clk_register(NULL, &subclk->hw);
+ if (WARN_ON(IS_ERR(clk)))
+ goto err_clk_register;
+
+ return clk;
+
+err_clk_register:
+ kfree(subclk);
+err_subclk_alloc:
+err_read_output_name:
+ return ERR_PTR(-EINVAL);
+}
+
+static void __init zynq_cpu_clk_setup(struct device_node *np)
+{
+ struct zynq_cpu_clk *cpuclk;
+ const char *parent_names[3];
+ struct clk_init_data init;
+ void __iomem *clk_621;
+ struct clk *clk;
+ u32 reg[2];
+ int err;
+ int i;
+
+ err = of_property_read_u32_array(np, "reg", reg, ARRAY_SIZE(reg));
+ if (WARN_ON(err))
+ return;
+
+ cpuclk = kzalloc(sizeof(*cpuclk), GFP_KERNEL);
+ if (WARN_ON(!cpuclk))
+ return;
+
+ cpuclk->clk_ctrl = slcr_base + reg[0];
+ clk_621 = slcr_base + reg[1];
+ spin_lock_init(&cpuclk->clkact_lock);
+
+ init.name = np->name;
+ init.ops = &zynq_cpu_clk_ops;
+ for (i = 0; i < ARRAY_SIZE(parent_names); i++)
+ parent_names[i] = of_clk_get_parent_name(np, i);
+ init.parent_names = parent_names;
+ init.num_parents = ARRAY_SIZE(parent_names);
+
+ cpuclk->hw.init = &init;
+
+ clk = clk_register(NULL, &cpuclk->hw);
+ if (WARN_ON(IS_ERR(clk)))
+ return;
+
+ err = of_clk_add_provider(np, of_clk_src_simple_get, clk);
+ if (WARN_ON(err))
+ return;
+
+ for (i = 0; i < 4; i++) {
+ cpuclk->subclks[i] = zynq_cpu_subclk_setup(np, i, clk_621);
+ if (WARN_ON(IS_ERR(cpuclk->subclks[i])))
+ return;
+ }
+
+ cpuclk->onecell_data.clks = cpuclk->subclks;
+ cpuclk->onecell_data.clk_num = i;
+
+ err = of_clk_add_provider(np, of_clk_src_onecell_get,
+ &cpuclk->onecell_data);
+ if (WARN_ON(err))
+ return;
+}
+
+static const __initconst struct of_device_id zynq_clk_match[] = {
+ { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
+ { .compatible = "xlnx,zynq-pll", .data = zynq_pll_clk_setup, },
+ { .compatible = "xlnx,zynq-periph-clock",
+ .data = zynq_periph_clk_setup, },
+ { .compatible = "xlnx,zynq-cpu-clock", .data = zynq_cpu_clk_setup, },
+ {}
+};
+
+void __init xilinx_zynq_clocks_init(void __iomem *slcr)
+{
+ slcr_base = slcr;
+ of_clk_init(zynq_clk_match);
+}
diff --git a/include/linux/clk/zynq.h b/include/linux/clk/zynq.h
new file mode 100644
index 0000000..56be7cd
--- /dev/null
+++ b/include/linux/clk/zynq.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2012 National Instruments
+ *
+ * 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 Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LINUX_CLK_ZYNQ_H_
+#define __LINUX_CLK_ZYNQ_H_
+
+void __init xilinx_zynq_clocks_init(void __iomem *slcr);
+
+#endif
--
1.8.0
^ permalink raw reply related
* [PATCH 8/8] ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
From: Tony Lindgren @ 2012-11-13 23:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50A2CF9C.1040902@ti.com>
* Jon Hunter <jon-hunter@ti.com> [121113 14:56]:
>
> On 11/13/2012 04:26 PM, Tony Lindgren wrote:
> > * Jon Hunter <jon-hunter@ti.com> [121113 10:15]:
> >> Move plat/dmtimer.h to plat-omap/dmtimer.h in order to support a single
> >> zImage for ARM devices.
> >
> > Let's skip this one for now as it turns out this solution won't
> > work either for multiplatform without adding nasty hacks to
> > arch/arm/Makefile to include arch/arm/plat-omap.
> >
> > Sorry I don't have any real solution in mind other than making
> > the remaining dmtimer.h users to use Linux generic timer functions,
> > or pass the dmtimer functions in platform_data for now.
>
> Ok, no problem. Are you happy with the others?
The others look OK to me thanks.
> One thing that we could do, is not include the dmtimer driver in the
> multi-platform build for now. I believe that only the dsp/iva/gfx is
> using this driver currently.
Looks like the users are drivers/staging/tidspbridge and
drivers/media/rc/ir-rx51.c. Both could use platform_data pointers
for now, but that really just postpones the problem.
> I believe that there are some issues with building the kernel without
> the dmtimer and so I can look into fixing that.
We can include it from <plat/dmtimer.h> for arch/arm/*omap*/*
code, but not for drivers.
> Is there a way to not include dmtimer with multi-platform but still
> enable in omap2plus_defconfig? Or are we planning to kill
> omap2plus_defconfig too?
We'll be keeping omap2plus_defconfig, but once we enable multiplatform
support there's really no reason to go back.
Regards,
Tony
^ permalink raw reply
* [PATCH v3] clk: Add support for fundamental zynq clks
From: Mike Turquette @ 2012-11-13 23:55 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121113232648.GA19911@beefymiracle.amer.corp.natinst.com>
Quoting Josh Cartwright (2012-11-13 15:26:48)
> Provide simplified models for the necessary clocks on the zynq-7000
> platform. Currently, the PLLs, the CPU clock network, and the basic
> peripheral clock networks (for SDIO, SMC, SPI, QSPI, UART) are modelled.
>
> OF bindings are also provided and documented.
>
> Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
> ---
> Michal-
>
> Here is a v3 with a fix for the problem Soren Brinkmann spotted. Am I
> correct that your current plan is to merge this into your tree?
>
> If so:
>
> Mike-
>
> Can we get your Acked-by on this one?
>
Acked-by: Mike Turquette <mturquette@linaro.org>
Regards,
Mike
> Thanks,
> Josh
>
> v3: - Fix PERIPH_CLK_CTRL_SRC macro (thanks to Soren Brinkmann)
>
> .../devicetree/bindings/clock/zynq-7000.txt | 55 +++
> drivers/clk/clk-zynq.c | 383 +++++++++++++++++++++
> include/linux/clk/zynq.h | 24 ++
> 3 files changed, 462 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/zynq-7000.txt
> create mode 100644 drivers/clk/clk-zynq.c
> create mode 100644 include/linux/clk/zynq.h
>
> diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt
> new file mode 100644
> index 0000000..23ae1db
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
> @@ -0,0 +1,55 @@
> +Device Tree Clock bindings for the Zynq 7000 EPP
> +
> +The Zynq EPP has several different clk providers, each with there own bindings.
> +The purpose of this document is to document their usage.
> +
> +See clock_bindings.txt for more information on the generic clock bindings.
> +See Chapter 25 of Zynq TRM for more information about Zynq clocks.
> +
> +== PLLs ==
> +
> +Used to describe the ARM_PLL, DDR_PLL, and IO_PLL.
> +
> +Required properties:
> +- #clock-cells : shall be 0 (only one clock is output from this node)
> +- compatible : "xlnx,zynq-pll"
> +- reg : pair of u32 values, which are the address offsets within the SLCR
> + of the relevant PLL_CTRL register and PLL_CFG register respectively
> +- clocks : phandle for parent clock. should be the phandle for ps_clk
> +
> +Optional properties:
> +- clock-output-names : name of the output clock
> +
> +Example:
> + armpll: armpll {
> + #clock-cells = <0>;
> + compatible = "xlnx,zynq-pll";
> + clocks = <&ps_clk>;
> + reg = <0x100 0x110>;
> + clock-output-names = "armpll";
> + };
> +
> +== Peripheral clocks ==
> +
> +Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks.
> +
> +Required properties:
> +- #clock-cells : shall be 1
> +- compatible : "xlnx,zynq-periph-clock"
> +- reg : a single u32 value, describing the offset within the SLCR where
> + the CLK_CTRL register is found for this peripheral
> +- clocks : phandle for parent clocks. should hold phandles for
> + the IO_PLL, ARM_PLL, and DDR_PLL in order
> +- clock-output-names : names of the output clock(s). For peripherals that have
> + two output clocks (for example, the UART), two clocks
> + should be listed.
> +
> +Example:
> + uart_clk: uart_clk {
> + #clock-cells = <1>;
> + compatible = "xlnx,zynq-periph-clock";
> + clocks = <&iopll &armpll &ddrpll>;
> + reg = <0x154>;
> + clock-output-names = "uart0_ref_clk",
> + "uart1_ref_clk";
> + };
> diff --git a/drivers/clk/clk-zynq.c b/drivers/clk/clk-zynq.c
> new file mode 100644
> index 0000000..37a3051
> --- /dev/null
> +++ b/drivers/clk/clk-zynq.c
> @@ -0,0 +1,383 @@
> +/*
> + * Copyright (c) 2012 National Instruments
> + *
> + * Josh Cartwright <josh.cartwright@ni.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope 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.
> + *
> + * You should have received a copy of the GNU General Public License along with
> + * this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +#include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/slab.h>
> +#include <linux/kernel.h>
> +#include <linux/clk-provider.h>
> +
> +static void __iomem *slcr_base;
> +
> +struct zynq_pll_clk {
> + struct clk_hw hw;
> + void __iomem *pll_ctrl;
> + void __iomem *pll_cfg;
> +};
> +
> +#define to_zynq_pll_clk(hw) container_of(hw, struct zynq_pll_clk, hw)
> +
> +#define CTRL_PLL_FDIV(x) ((x) >> 12)
> +
> +static unsigned long zynq_pll_recalc_rate(struct clk_hw *hw,
> + unsigned long parent_rate)
> +{
> + struct zynq_pll_clk *pll = to_zynq_pll_clk(hw);
> + return parent_rate * CTRL_PLL_FDIV(ioread32(pll->pll_ctrl));
> +}
> +
> +static const struct clk_ops zynq_pll_clk_ops = {
> + .recalc_rate = zynq_pll_recalc_rate,
> +};
> +
> +static void __init zynq_pll_clk_setup(struct device_node *np)
> +{
> + struct clk_init_data init;
> + struct zynq_pll_clk *pll;
> + const char *parent_name;
> + struct clk *clk;
> + u32 regs[2];
> + int ret;
> +
> + ret = of_property_read_u32_array(np, "reg", regs, ARRAY_SIZE(regs));
> + if (WARN_ON(ret))
> + return;
> +
> + pll = kzalloc(sizeof(*pll), GFP_KERNEL);
> + if (WARN_ON(!pll))
> + return;
> +
> + pll->pll_ctrl = slcr_base + regs[0];
> + pll->pll_cfg = slcr_base + regs[1];
> +
> + of_property_read_string(np, "clock-output-names", &init.name);
> +
> + init.ops = &zynq_pll_clk_ops;
> + parent_name = of_clk_get_parent_name(np, 0);
> + init.parent_names = &parent_name;
> + init.num_parents = 1;
> +
> + pll->hw.init = &init;
> +
> + clk = clk_register(NULL, &pll->hw);
> + if (WARN_ON(IS_ERR(clk)))
> + return;
> +
> + ret = of_clk_add_provider(np, of_clk_src_simple_get, clk);
> + if (WARN_ON(ret))
> + return;
> +}
> +
> +struct zynq_periph_clk {
> + struct clk_hw hw;
> + struct clk_onecell_data onecell_data;
> + struct clk *gates[2];
> + void __iomem *clk_ctrl;
> + spinlock_t clkact_lock;
> +};
> +
> +#define to_zynq_periph_clk(hw) container_of(hw, struct zynq_periph_clk, hw)
> +
> +static const u8 periph_clk_parent_map[] = {
> + 0, 0, 1, 2
> +};
> +#define PERIPH_CLK_CTRL_SRC(x) (periph_clk_parent_map[((x) & 0x30) >> 4])
> +#define PERIPH_CLK_CTRL_DIV(x) (((x) & 0x3F00) >> 8)
> +
> +static unsigned long zynq_periph_recalc_rate(struct clk_hw *hw,
> + unsigned long parent_rate)
> +{
> + struct zynq_periph_clk *periph = to_zynq_periph_clk(hw);
> + return parent_rate / PERIPH_CLK_CTRL_DIV(ioread32(periph->clk_ctrl));
> +}
> +
> +static u8 zynq_periph_get_parent(struct clk_hw *hw)
> +{
> + struct zynq_periph_clk *periph = to_zynq_periph_clk(hw);
> + return PERIPH_CLK_CTRL_SRC(ioread32(periph->clk_ctrl));
> +}
> +
> +static const struct clk_ops zynq_periph_clk_ops = {
> + .recalc_rate = zynq_periph_recalc_rate,
> + .get_parent = zynq_periph_get_parent,
> +};
> +
> +static void __init zynq_periph_clk_setup(struct device_node *np)
> +{
> + struct zynq_periph_clk *periph;
> + const char *parent_names[3];
> + struct clk_init_data init;
> + int clk_num = 0, err;
> + const char *name;
> + struct clk *clk;
> + u32 reg;
> + int i;
> +
> + err = of_property_read_u32(np, "reg", ®);
> + if (WARN_ON(err))
> + return;
> +
> + periph = kzalloc(sizeof(*periph), GFP_KERNEL);
> + if (WARN_ON(!periph))
> + return;
> +
> + periph->clk_ctrl = slcr_base + reg;
> + spin_lock_init(&periph->clkact_lock);
> +
> + init.name = np->name;
> + init.ops = &zynq_periph_clk_ops;
> + for (i = 0; i < ARRAY_SIZE(parent_names); i++)
> + parent_names[i] = of_clk_get_parent_name(np, i);
> + init.parent_names = parent_names;
> + init.num_parents = ARRAY_SIZE(parent_names);
> +
> + periph->hw.init = &init;
> +
> + clk = clk_register(NULL, &periph->hw);
> + if (WARN_ON(IS_ERR(clk)))
> + return;
> +
> + err = of_clk_add_provider(np, of_clk_src_simple_get, clk);
> + if (WARN_ON(err))
> + return;
> +
> + err = of_property_read_string_index(np, "clock-output-names", 0,
> + &name);
> + if (WARN_ON(err))
> + return;
> +
> + periph->gates[0] = clk_register_gate(NULL, name, np->name, 0,
> + periph->clk_ctrl, 0, 0,
> + &periph->clkact_lock);
> + if (WARN_ON(IS_ERR(periph->gates[0])))
> + return;
> + clk_num++;
> +
> + /* some periph clks have 2 downstream gates */
> + err = of_property_read_string_index(np, "clock-output-names", 1,
> + &name);
> + if (err != -ENODATA) {
> + periph->gates[1] = clk_register_gate(NULL, name, np->name, 0,
> + periph->clk_ctrl, 1, 0,
> + &periph->clkact_lock);
> + if (WARN_ON(IS_ERR(periph->gates[1])))
> + return;
> + clk_num++;
> + }
> +
> + periph->onecell_data.clks = periph->gates;
> + periph->onecell_data.clk_num = clk_num;
> +
> + err = of_clk_add_provider(np, of_clk_src_onecell_get,
> + &periph->onecell_data);
> + if (WARN_ON(err))
> + return;
> +}
> +
> +/* CPU Clock domain is modelled as a mux with 4 children subclks, whose
> + * derivative rates depend on CLK_621_TRUE
> + */
> +
> +struct zynq_cpu_clk {
> + struct clk_hw hw;
> + struct clk_onecell_data onecell_data;
> + struct clk *subclks[4];
> + void __iomem *clk_ctrl;
> + spinlock_t clkact_lock;
> +};
> +
> +#define to_zynq_cpu_clk(hw) container_of(hw, struct zynq_cpu_clk, hw)
> +
> +static const u8 zynq_cpu_clk_parent_map[] = {
> + 1, 1, 2, 0
> +};
> +#define CPU_CLK_SRCSEL(x) (zynq_cpu_clk_parent_map[(((x) & 0x30) >> 4)])
> +#define CPU_CLK_CTRL_DIV(x) (((x) & 0x3F00) >> 8)
> +
> +static u8 zynq_cpu_clk_get_parent(struct clk_hw *hw)
> +{
> + struct zynq_cpu_clk *cpuclk = to_zynq_cpu_clk(hw);
> + return CPU_CLK_SRCSEL(ioread32(cpuclk->clk_ctrl));
> +}
> +
> +static unsigned long zynq_cpu_clk_recalc_rate(struct clk_hw *hw,
> + unsigned long parent_rate)
> +{
> + struct zynq_cpu_clk *cpuclk = to_zynq_cpu_clk(hw);
> + return parent_rate / CPU_CLK_CTRL_DIV(ioread32(cpuclk->clk_ctrl));
> +}
> +
> +static const struct clk_ops zynq_cpu_clk_ops = {
> + .get_parent = zynq_cpu_clk_get_parent,
> + .recalc_rate = zynq_cpu_clk_recalc_rate,
> +};
> +
> +struct zynq_cpu_subclk {
> + struct clk_hw hw;
> + void __iomem *clk_621;
> + enum {
> + CPU_SUBCLK_6X4X,
> + CPU_SUBCLK_3X2X,
> + CPU_SUBCLK_2X,
> + CPU_SUBCLK_1X,
> + } which;
> +};
> +
> +#define CLK_621_TRUE(x) ((x) & 1)
> +
> +#define to_zynq_cpu_subclk(hw) container_of(hw, struct zynq_cpu_subclk, hw);
> +
> +static unsigned long zynq_cpu_subclk_recalc_rate(struct clk_hw *hw,
> + unsigned long parent_rate)
> +{
> + unsigned long uninitialized_var(rate);
> + struct zynq_cpu_subclk *subclk;
> + bool is_621;
> +
> + subclk = to_zynq_cpu_subclk(hw)
> + is_621 = CLK_621_TRUE(ioread32(subclk->clk_621));
> +
> + switch (subclk->which) {
> + case CPU_SUBCLK_6X4X:
> + rate = parent_rate;
> + break;
> + case CPU_SUBCLK_3X2X:
> + rate = parent_rate / 2;
> + break;
> + case CPU_SUBCLK_2X:
> + rate = parent_rate / (is_621 ? 3 : 2);
> + break;
> + case CPU_SUBCLK_1X:
> + rate = parent_rate / (is_621 ? 6 : 4);
> + break;
> + };
> +
> + return rate;
> +}
> +
> +static const struct clk_ops zynq_cpu_subclk_ops = {
> + .recalc_rate = zynq_cpu_subclk_recalc_rate,
> +};
> +
> +static struct clk *zynq_cpu_subclk_setup(struct device_node *np, u8 which,
> + void __iomem *clk_621)
> +{
> + struct zynq_cpu_subclk *subclk;
> + struct clk_init_data init;
> + struct clk *clk;
> + int err;
> +
> + err = of_property_read_string_index(np, "clock-output-names",
> + which, &init.name);
> + if (WARN_ON(err))
> + goto err_read_output_name;
> +
> + subclk = kzalloc(sizeof(*subclk), GFP_KERNEL);
> + if (!subclk)
> + goto err_subclk_alloc;
> +
> + subclk->clk_621 = clk_621;
> + subclk->which = which;
> +
> + init.ops = &zynq_cpu_subclk_ops;
> + init.parent_names = &np->name;
> + init.num_parents = 1;
> +
> + subclk->hw.init = &init;
> +
> + clk = clk_register(NULL, &subclk->hw);
> + if (WARN_ON(IS_ERR(clk)))
> + goto err_clk_register;
> +
> + return clk;
> +
> +err_clk_register:
> + kfree(subclk);
> +err_subclk_alloc:
> +err_read_output_name:
> + return ERR_PTR(-EINVAL);
> +}
> +
> +static void __init zynq_cpu_clk_setup(struct device_node *np)
> +{
> + struct zynq_cpu_clk *cpuclk;
> + const char *parent_names[3];
> + struct clk_init_data init;
> + void __iomem *clk_621;
> + struct clk *clk;
> + u32 reg[2];
> + int err;
> + int i;
> +
> + err = of_property_read_u32_array(np, "reg", reg, ARRAY_SIZE(reg));
> + if (WARN_ON(err))
> + return;
> +
> + cpuclk = kzalloc(sizeof(*cpuclk), GFP_KERNEL);
> + if (WARN_ON(!cpuclk))
> + return;
> +
> + cpuclk->clk_ctrl = slcr_base + reg[0];
> + clk_621 = slcr_base + reg[1];
> + spin_lock_init(&cpuclk->clkact_lock);
> +
> + init.name = np->name;
> + init.ops = &zynq_cpu_clk_ops;
> + for (i = 0; i < ARRAY_SIZE(parent_names); i++)
> + parent_names[i] = of_clk_get_parent_name(np, i);
> + init.parent_names = parent_names;
> + init.num_parents = ARRAY_SIZE(parent_names);
> +
> + cpuclk->hw.init = &init;
> +
> + clk = clk_register(NULL, &cpuclk->hw);
> + if (WARN_ON(IS_ERR(clk)))
> + return;
> +
> + err = of_clk_add_provider(np, of_clk_src_simple_get, clk);
> + if (WARN_ON(err))
> + return;
> +
> + for (i = 0; i < 4; i++) {
> + cpuclk->subclks[i] = zynq_cpu_subclk_setup(np, i, clk_621);
> + if (WARN_ON(IS_ERR(cpuclk->subclks[i])))
> + return;
> + }
> +
> + cpuclk->onecell_data.clks = cpuclk->subclks;
> + cpuclk->onecell_data.clk_num = i;
> +
> + err = of_clk_add_provider(np, of_clk_src_onecell_get,
> + &cpuclk->onecell_data);
> + if (WARN_ON(err))
> + return;
> +}
> +
> +static const __initconst struct of_device_id zynq_clk_match[] = {
> + { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
> + { .compatible = "xlnx,zynq-pll", .data = zynq_pll_clk_setup, },
> + { .compatible = "xlnx,zynq-periph-clock",
> + .data = zynq_periph_clk_setup, },
> + { .compatible = "xlnx,zynq-cpu-clock", .data = zynq_cpu_clk_setup, },
> + {}
> +};
> +
> +void __init xilinx_zynq_clocks_init(void __iomem *slcr)
> +{
> + slcr_base = slcr;
> + of_clk_init(zynq_clk_match);
> +}
> diff --git a/include/linux/clk/zynq.h b/include/linux/clk/zynq.h
> new file mode 100644
> index 0000000..56be7cd
> --- /dev/null
> +++ b/include/linux/clk/zynq.h
> @@ -0,0 +1,24 @@
> +/*
> + * Copyright (C) 2012 National Instruments
> + *
> + * 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 Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + */
> +
> +#ifndef __LINUX_CLK_ZYNQ_H_
> +#define __LINUX_CLK_ZYNQ_H_
> +
> +void __init xilinx_zynq_clocks_init(void __iomem *slcr);
> +
> +#endif
> --
> 1.8.0
^ permalink raw reply
* [PATCHv2] ARM: OMAP4: USB: power down MUSB PHY during boot
From: Kevin Hilman @ 2012-11-14 0:03 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20121109143033.GB10718@arwen.pp.htv.fi>
Felipe Balbi <balbi@ti.com> writes:
> HI,
>
> On Fri, Nov 09, 2012 at 04:30:35PM +0200, Tero Kristo wrote:
>> Commit c9e4412ab8eb8ef82d645d8749c4ce96ad490007 removed all of the USB
>> PHY functions for OMAP4, but this causes a problem with core retention
>> as the MUSB module remains enabled if omap-usb2 phy driver is not used.
>> This keeps the USB DPLL enabled and prevents l3_init pwrdm from idling.
>>
>> Fixed by adding a minimal function back that disables the USB PHY during
>> boot.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>> Cc: Felipe Balbi <balbi@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>
> looks good to me. I would still suggest adding a REVISIT or FIXME note
> stating that this should be moved to SCM driver eventually ;-)
>
> Other than that:
>
> Acked-by: Felipe Balbi <balbi@ti.com>
Thanks will try to get this in for v3.8 along with the original patch
4/9 which gets full-chip retention working on OMAP4.
Kevin
^ 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