Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] sched: Load Balancing using Per-entity-Load-tracking
From: preeti @ 2012-10-19  4:17 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121018172609.GA14473@e103034-lin>

Hi Morten,
Thank you very much for your review.

>> 1.Consider a scenario,where there are two 10% tasks running on a cpu.The
>>   present code will consider the load on this queue to be 2048,while
>>   using PJT's metric the load is calculated to be <1000,rarely exceeding this
>>   limit.Although the tasks are not contributing much to the cpu load,they are
>>   decided to be moved by the scheduler.
> 
> I guess that you assume, for now, that all tasks have default (nice 0)
> priority? Both the old load and the PJT metric (tracked load) depends on
> priority.
Thats right.I have assumed default priority of the tasks.
> 
>>
>>   But one could argue that 'not moving one of these tasks could throttle
>>   them.If there was an idle cpu,perhaps we could have moved them'.While the
>>   power save mode would have been fine with not moving the task,the
>>   performance mode would prefer not to throttle the tasks.We could strive
>>   to strike a balance by making this decision tunable with certain parameters.
>>   This patchset includes such tunables.This issue is addressed in Patch[1/2].
>>
> 
> One could also argue that long as there are spare cpu cycles in each
> schedule period then all tasks have received the cpu time they needed.
> So from that point of view performance isn't affected by not balancing
> the tasks as long as the cpu is not fully utilized. If we look at the
> problem from a latency point of view then packing tasks on a single cpu
> will increase latency but the increase will be bounded by the schedule
> period.
> 
Assume that at the end of one scheduling period,there are a few spare
cycles on the cpu.this is fine from both the performance and latency
point of view at *this* point.nobody is waiting for the cpu.

The issue arises if it is detected that these spare cycles are due to
*sleeping tasks* and not due to no tasks.

At this point a decision needs to be made as to: if a scenario arises
where all these tasks wake up at the same time in the future,and wait on
the cpu,then are we ok with them waiting.Both performance and latency
views could be against this,as this also means less throughput.But
performance view could go slightly easy on this to argue,that its ok if
2-3 tasks wait,if more,then there is a need to move them.
>>   This patchset therefore has two primary aims.
>>          Patch[1/2]: This patch aims at detecting short running tasks and
>> 	 prevent their movement.In update_sg_lb_stats,dismiss a sched group
>> 	 as a candidate for load balancing,if load calculated by PJT's metric
>> 	 says that the average load on the sched_group <= 1024+(.15*1024).
>> 	 This is a tunable,which can be varied after sufficient experiments.
> 
> Your current threshold implies that there must be at least two (nice 0)
> tasks running breach the threshold and they need to be quite busy. This
> makes sense to me. When you have more tasks they are more likely to be
> waiting on the runqueue even if it is only 10% tasks. Let's say you have
> five 10% tasks and they all become runnable at the same instant. In that
> case some of the tasks would have a tracked load which is much higher
> than if we only had two 10% tasks running. So if I'm not mistaken, it
> would be possible to breach the threshold even though the overall cpu
> utilization is only 50% and it would have been safe not to load-balance
> that cpu.
> 
> Do you think it would make sense to let the threshold depend on the
> number of task on the cpu somehow? 

You are right,Morten.In fact I have included this viewpoint in both my
first and second patch enclosed by this. So lets take up the above
scenario.if there are 5 10% tasks running,they will surely cross the
threshold,but the cpu might have spare cycles at the end of a scheduling
period.Now that is your concern.

Again we have two different viewpoints.This threshold is like a tuning
knob.we could increase it if we feel that this threshold gets reached
very quickly with as few tasks as 5, although the cpu utilization is
poor.we prefer not to wake up another cpu unless the present cpu is
aptly loaded.we could call this the power saving view.

Else we could say that,we are not intending to affect the throughput of
tasks,so we prefer the knob be at this value,so that we qualify such a
load as a candidate for load balancing.we could call this the
performance view.
> 
> Alternative, the decision could be based on the cpu idle time over the
> last schedule period. A cpu with no or very few spare cycles in the last
> schedule period would be a good candidate for load-balancing. Latency
> would be affected as mentioned earlier.
> 
Exactly.idle_time == spare_cpu_cycles == less cpu_utilization.I hope i
am not wrong in drawing this equivalence.if thats the case then the same
explanation as above holds good here too.
> 
> Morten

Thank you

Regards
Preeti

^ permalink raw reply

* [PATCH net-next 03/21] arch: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
From: Joe Perches @ 2012-10-19  3:55 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <cover.1350618006.git.joe@perches.com>

Convert the old ether_addr tests to eth_addr_<foo>.
Adds api consistency.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/arm/mach-davinci/board-mityomapl138.c |    2 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c         |    2 +-
 arch/avr32/boards/atngw100/setup.c         |    2 +-
 arch/avr32/boards/atstk1000/atstk1002.c    |    2 +-
 arch/avr32/boards/favr-32/setup.c          |    2 +-
 arch/avr32/boards/hammerhead/setup.c       |    2 +-
 arch/avr32/boards/merisc/setup.c           |    2 +-
 arch/avr32/boards/mimc200/setup.c          |    2 +-
 arch/mips/alchemy/common/platform.c        |    4 ++--
 arch/um/drivers/net_kern.c                 |    6 +++---
 10 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 43e4a0d..df45c9c 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -138,7 +138,7 @@ static void read_factory_config(struct memory_accessor *a, void *context)
 	}
 
 	pr_info("MityOMAPL138: Found MAC = %pM\n", factory_config.mac);
-	if (is_valid_ether_addr(factory_config.mac))
+	if (eth_addr_valid(factory_config.mac))
 		memcpy(soc_info->emac_pdata->mac_addr,
 			factory_config.mac, ETH_ALEN);
 	else
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index 8240291..839040c 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -52,7 +52,7 @@ void __init colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data)
 		serial >>= 8;
 	}
 
-	if (is_valid_ether_addr(ether_mac_addr)) {
+	if (eth_addr_valid(ether_mac_addr)) {
 		plat_data->flags |= AXFLG_MAC_FROMPLATFORM;
 		plat_data->mac_addr = ether_mac_addr;
 		printk(KERN_INFO "%s(): taking MAC from serial boot tag\n",
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index afeae89..5f7d86d 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -175,7 +175,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 		return;
 
 	addr = hw_addr[pdev->id].addr;
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	/*
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 6c80aba..7334686 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -189,7 +189,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 		return;
 
 	addr = hw_addr[pdev->id].addr;
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	/*
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c
index 27bd6fb..0b76aa7 100644
--- a/arch/avr32/boards/favr-32/setup.c
+++ b/arch/avr32/boards/favr-32/setup.c
@@ -196,7 +196,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 		return;
 
 	addr = hw_addr[pdev->id].addr;
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	/*
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c
index 9d1efd1..d64fa9f 100644
--- a/arch/avr32/boards/hammerhead/setup.c
+++ b/arch/avr32/boards/hammerhead/setup.c
@@ -139,7 +139,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 
 	addr = hw_addr[pdev->id].addr;
 
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	/*
diff --git a/arch/avr32/boards/merisc/setup.c b/arch/avr32/boards/merisc/setup.c
index ed137e3..817d2d8 100644
--- a/arch/avr32/boards/merisc/setup.c
+++ b/arch/avr32/boards/merisc/setup.c
@@ -129,7 +129,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 		return;
 
 	addr = hw_addr[pdev->id].addr;
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	regs = (void __iomem __force *)res->start;
diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c
index 05358aa..31cd87e 100644
--- a/arch/avr32/boards/mimc200/setup.c
+++ b/arch/avr32/boards/mimc200/setup.c
@@ -152,7 +152,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
 		return;
 
 	addr = hw_addr[pdev->id].addr;
-	if (!is_valid_ether_addr(addr))
+	if (!eth_addr_valid(addr))
 		return;
 
 	/*
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index c0f3ce6..5f07da3 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -343,7 +343,7 @@ static void __init alchemy_setup_macs(int ctype)
 	au1xxx_eth0_device.resource = macres;
 
 	i = prom_get_ethernet_addr(ethaddr);
-	if (!i && !is_valid_ether_addr(au1xxx_eth0_platform_data.mac))
+	if (!i && !eth_addr_valid(au1xxx_eth0_platform_data.mac))
 		memcpy(au1xxx_eth0_platform_data.mac, ethaddr, 6);
 
 	ret = platform_device_register(&au1xxx_eth0_device);
@@ -364,7 +364,7 @@ static void __init alchemy_setup_macs(int ctype)
 	au1xxx_eth1_device.resource = macres;
 
 	ethaddr[5] += 1;	/* next addr for 2nd MAC */
-	if (!i && !is_valid_ether_addr(au1xxx_eth1_platform_data.mac))
+	if (!i && !eth_addr_valid(au1xxx_eth1_platform_data.mac))
 		memcpy(au1xxx_eth1_platform_data.mac, ethaddr, 6);
 
 	/* Register second MAC if enabled in pinfunc */
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index b1314eb..47e11e7 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -312,19 +312,19 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name)
 		}
 		str = end + 1;
 	}
-	if (is_multicast_ether_addr(addr)) {
+	if (eth_addr_multicast(addr)) {
 		printk(KERN_ERR
 		       "Attempt to assign a multicast ethernet address to a "
 		       "device disallowed\n");
 		goto random;
 	}
-	if (!is_valid_ether_addr(addr)) {
+	if (!eth_addr_valid(addr)) {
 		printk(KERN_ERR
 		       "Attempt to assign an invalid ethernet address to a "
 		       "device disallowed\n");
 		goto random;
 	}
-	if (!is_local_ether_addr(addr)) {
+	if (!eth_addr_local(addr)) {
 		printk(KERN_WARNING
 		       "Warning: Assigning a globally valid ethernet "
 		       "address to a device\n");
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH net-next 00/21] treewide: Use consistent api style for address testing
From: Joe Perches @ 2012-10-19  3:55 UTC (permalink / raw)
  To: linux-arm-kernel

ethernet, ipv4, and ipv6 address testing uses 3 different api naming styles.

ethernet uses:	is_<foo>_ether_addr
ipv4 uses:	ipv4_is_<foo>
ipv6 uses:	ipv6_addr_<foo>

Standardize on the ipv6 style of <prefix>_addr_<type> to reduce
the number of styles to remember.

The new consistent styles are:

eth_addr_<foo>(const u8 *)
ipv4_addr_<foo>(__be32)
ipv6_addr_<foo>(const struct in6_addr *)

Add temporary backward compatibility #defines for the old names too.

Joe Perches (21):
  etherdevice: Rename is_<foo>_ether_addr tests to eth_addr_<foo>
  net: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  arch: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  wireless: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  drivers: net: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  staging: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  infiniband: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  scsi: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  of: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  s390: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  usb: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  uwb: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  Documentation: networking: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  llc_if.h: Convert is_<foo>_ether_addr uses to eth_addr_<foo>
  in.h: Rename ipv4_is_<foo> functions to ipv4_addr_<foo>
  net: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
  infiniband: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
  ath6kl: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
  parisc: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
  lockd: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
  sctp: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>

 Documentation/networking/driver.txt                |    2 +-
 arch/arm/mach-davinci/board-mityomapl138.c         |    2 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c                 |    2 +-
 arch/avr32/boards/atngw100/setup.c                 |    2 +-
 arch/avr32/boards/atstk1000/atstk1002.c            |    2 +-
 arch/avr32/boards/favr-32/setup.c                  |    2 +-
 arch/avr32/boards/hammerhead/setup.c               |    2 +-
 arch/avr32/boards/merisc/setup.c                   |    2 +-
 arch/avr32/boards/mimc200/setup.c                  |    2 +-
 arch/mips/alchemy/common/platform.c                |    4 +-
 arch/um/drivers/net_kern.c                         |    6 +-
 drivers/infiniband/core/cma.c                      |    4 +-
 drivers/infiniband/hw/amso1100/c2.c                |    2 +-
 drivers/infiniband/hw/nes/nes_nic.c                |    2 +-
 drivers/net/bonding/bond_3ad.c                     |    2 +-
 drivers/net/bonding/bond_alb.c                     |    2 +-
 drivers/net/bonding/bond_main.c                    |    6 +-
 drivers/net/dummy.c                                |    2 +-
 drivers/net/ethernet/3com/3c59x.c                  |    2 +-
 drivers/net/ethernet/3com/typhoon.c                |    2 +-
 drivers/net/ethernet/8390/etherh.c                 |    2 +-
 drivers/net/ethernet/adi/bfin_mac.c                |    6 +-
 drivers/net/ethernet/aeroflex/greth.c              |    4 +-
 drivers/net/ethernet/amd/au1000_eth.c              |    2 +-
 drivers/net/ethernet/amd/depca.c                   |    4 +-
 drivers/net/ethernet/amd/pcnet32.c                 |    8 ++--
 drivers/net/ethernet/atheros/atl1c/atl1c_hw.c      |    2 +-
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c    |    2 +-
 drivers/net/ethernet/atheros/atl1e/atl1e_hw.c      |    4 +-
 drivers/net/ethernet/atheros/atl1e/atl1e_main.c    |    2 +-
 drivers/net/ethernet/atheros/atlx/atl1.c           |   10 ++--
 drivers/net/ethernet/atheros/atlx/atl2.c           |   14 +++---
 drivers/net/ethernet/atheros/atlx/atlx.c           |    2 +-
 drivers/net/ethernet/broadcom/b44.c                |    4 +-
 drivers/net/ethernet/broadcom/bnx2.c               |    2 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c    |    6 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h    |    4 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |    6 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c     |    2 +-
 drivers/net/ethernet/broadcom/cnic.c               |    2 +-
 drivers/net/ethernet/broadcom/tg3.c                |    6 +-
 drivers/net/ethernet/brocade/bna/bnad.c            |    6 +-
 drivers/net/ethernet/cadence/at91_ether.c          |    6 +-
 drivers/net/ethernet/cadence/macb.c                |    4 +-
 drivers/net/ethernet/calxeda/xgmac.c               |    6 +-
 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c    |    2 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |    2 +-
 .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c    |    2 +-
 drivers/net/ethernet/cirrus/ep93xx_eth.c           |    2 +-
 drivers/net/ethernet/cirrus/mac89x0.c              |    2 +-
 drivers/net/ethernet/cisco/enic/enic_dev.c         |    4 +-
 drivers/net/ethernet/cisco/enic/enic_main.c        |   10 ++--
 drivers/net/ethernet/cisco/enic/enic_pp.c          |   10 ++--
 drivers/net/ethernet/davicom/dm9000.c              |    6 +-
 drivers/net/ethernet/dec/ewrk3.c                   |    4 +-
 drivers/net/ethernet/dec/tulip/de4x5.c             |    4 +-
 drivers/net/ethernet/dlink/sundance.c              |    2 +-
 drivers/net/ethernet/dnet.c                        |    6 +-
 drivers/net/ethernet/emulex/benet/be_main.c        |    8 ++--
 drivers/net/ethernet/ethoc.c                       |    6 +-
 drivers/net/ethernet/faraday/ftgmac100.c           |    2 +-
 drivers/net/ethernet/faraday/ftmac100.c            |    2 +-
 drivers/net/ethernet/freescale/fec.c               |    8 ++--
 drivers/net/ethernet/freescale/fec_mpc52xx.c       |    2 +-
 drivers/net/ethernet/freescale/gianfar_ethtool.c   |   12 ++--
 drivers/net/ethernet/freescale/ucc_geth.c          |    2 +-
 drivers/net/ethernet/i825xx/ether1.c               |    2 +-
 drivers/net/ethernet/ibm/ehea/ehea_main.c          |    4 +-
 drivers/net/ethernet/intel/e100.c                  |    4 +-
 drivers/net/ethernet/intel/e1000/e1000_main.c      |    4 +-
 drivers/net/ethernet/intel/e1000e/mac.c            |    2 +-
 drivers/net/ethernet/intel/e1000e/netdev.c         |    4 +-
 drivers/net/ethernet/intel/igb/e1000_mac.c         |    2 +-
 drivers/net/ethernet/intel/igb/igb_main.c          |    8 ++--
 drivers/net/ethernet/intel/igbvf/netdev.c          |    6 +-
 drivers/net/ethernet/intel/ixgb/ixgb_hw.c          |    6 +-
 drivers/net/ethernet/intel/ixgb/ixgb_main.c        |    6 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c      |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |   14 +++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c     |    6 +-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c  |    8 ++--
 drivers/net/ethernet/lantiq_etop.c                 |    2 +-
 drivers/net/ethernet/marvell/mv643xx_eth.c         |    4 +-
 drivers/net/ethernet/marvell/pxa168_eth.c          |    2 +-
 drivers/net/ethernet/marvell/skge.c                |    6 +-
 drivers/net/ethernet/marvell/sky2.c                |    2 +-
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c     |    2 +-
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    4 +-
 drivers/net/ethernet/micrel/ks8695net.c            |    6 +-
 drivers/net/ethernet/micrel/ks8842.c               |    4 +-
 drivers/net/ethernet/micrel/ks8851.c               |    4 +-
 drivers/net/ethernet/micrel/ks8851_mll.c           |    2 +-
 drivers/net/ethernet/microchip/enc28j60.c          |    4 +-
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c   |    2 +-
 drivers/net/ethernet/neterion/s2io.c               |    2 +-
 drivers/net/ethernet/neterion/vxge/vxge-config.c   |    2 +-
 drivers/net/ethernet/neterion/vxge/vxge-main.c     |   12 ++--
 drivers/net/ethernet/netx-eth.c                    |    2 +-
 drivers/net/ethernet/nuvoton/w90p910_ether.c       |    4 +-
 drivers/net/ethernet/nvidia/forcedeth.c            |    4 +-
 drivers/net/ethernet/nxp/lpc_eth.c                 |    8 ++--
 drivers/net/ethernet/octeon/octeon_mgmt.c          |    2 +-
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   |    6 +-
 drivers/net/ethernet/pasemi/pasemi_mac.c           |    4 +-
 .../net/ethernet/qlogic/netxen/netxen_nic_main.c   |    4 +-
 drivers/net/ethernet/qlogic/qla3xxx.c              |    2 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c   |    4 +-
 drivers/net/ethernet/qlogic/qlge/qlge_main.c       |    6 +-
 drivers/net/ethernet/realtek/8139cp.c              |    2 +-
 drivers/net/ethernet/realtek/8139too.c             |    2 +-
 drivers/net/ethernet/realtek/r8169.c               |    2 +-
 drivers/net/ethernet/renesas/sh_eth.c              |    4 +-
 drivers/net/ethernet/seeq/ether3.c                 |    2 +-
 drivers/net/ethernet/sfc/efx.c                     |    2 +-
 drivers/net/ethernet/sfc/ethtool.c                 |    6 +-
 drivers/net/ethernet/sfc/siena_sriov.c             |    6 +-
 drivers/net/ethernet/sis/sis900.c                  |    2 +-
 drivers/net/ethernet/smsc/smc911x.c                |    4 +-
 drivers/net/ethernet/smsc/smc91x.c                 |    4 +-
 drivers/net/ethernet/smsc/smsc911x.c               |   10 ++--
 drivers/net/ethernet/smsc/smsc9420.c               |    6 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |    4 +-
 drivers/net/ethernet/sun/niu.c                     |    8 ++--
 drivers/net/ethernet/sun/sungem.c                  |    2 +-
 drivers/net/ethernet/ti/cpsw.c                     |    2 +-
 drivers/net/ethernet/ti/davinci_emac.c             |    6 +-
 drivers/net/ethernet/tile/tilegx.c                 |    4 +-
 drivers/net/ethernet/tile/tilepro.c                |    4 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c       |    2 +-
 drivers/net/ethernet/toshiba/ps3_gelic_wireless.c  |    2 +-
 drivers/net/ethernet/toshiba/spider_net.c          |    4 +-
 drivers/net/ethernet/toshiba/tc35815.c             |    4 +-
 drivers/net/ethernet/tundra/tsi108_eth.c           |    8 ++--
 drivers/net/ethernet/via/via-rhine.c               |    2 +-
 drivers/net/ethernet/wiznet/w5100.c                |    6 +-
 drivers/net/ethernet/wiznet/w5300.c                |    6 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c        |    2 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  |    2 +-
 drivers/net/hamradio/bpqether.c                    |    2 +-
 drivers/net/ifb.c                                  |    2 +-
 drivers/net/macvlan.c                              |   16 +++---
 drivers/net/phy/at803x.c                           |    2 +-
 drivers/net/rionet.c                               |    4 +-
 drivers/net/team/team.c                            |    4 +-
 drivers/net/tun.c                                  |    4 +-
 drivers/net/usb/asix_common.c                      |    2 +-
 drivers/net/usb/dm9601.c                           |    4 +-
 drivers/net/usb/mcs7830.c                          |    2 +-
 drivers/net/usb/smsc75xx.c                         |    2 +-
 drivers/net/usb/smsc95xx.c                         |    2 +-
 drivers/net/veth.c                                 |    2 +-
 drivers/net/vxlan.c                                |    4 +-
 drivers/net/wimax/i2400m/driver.c                  |    2 +-
 drivers/net/wireless/adm8211.c                     |    2 +-
 drivers/net/wireless/airo.c                        |    4 +-
 drivers/net/wireless/at76c50x-usb.c                |    8 ++--
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |    8 ++--
 drivers/net/wireless/ath/ath6kl/main.c             |    8 ++--
 drivers/net/wireless/ath/ath6kl/txrx.c             |   10 ++--
 drivers/net/wireless/ath/ath6kl/wmi.c              |    4 +-
 drivers/net/wireless/ath/ath9k/recv.c              |    8 ++--
 drivers/net/wireless/b43/main.c                    |    2 +-
 drivers/net/wireless/b43legacy/main.c              |    2 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |    4 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    2 +-
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |    2 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c     |   16 +++---
 drivers/net/wireless/hostap/hostap_info.c          |    2 +-
 drivers/net/wireless/hostap/hostap_ioctl.c         |    8 ++--
 drivers/net/wireless/hostap/hostap_main.c          |    2 +-
 drivers/net/wireless/ipw2x00/ipw2100.c             |    6 +-
 drivers/net/wireless/ipw2x00/ipw2200.c             |   18 +++---
 drivers/net/wireless/ipw2x00/libipw_rx.c           |   12 ++--
 drivers/net/wireless/ipw2x00/libipw_tx.c           |    4 +-
 drivers/net/wireless/iwlegacy/3945-mac.c           |    2 +-
 drivers/net/wireless/iwlegacy/4965-mac.c           |    2 +-
 drivers/net/wireless/iwlegacy/common.c             |    2 +-
 drivers/net/wireless/iwlwifi/dvm/sta.c             |    2 +-
 drivers/net/wireless/libertas_tf/main.c            |    2 +-
 drivers/net/wireless/mwifiex/join.c                |    2 +-
 drivers/net/wireless/mwifiex/scan.c                |    2 +-
 drivers/net/wireless/mwifiex/sta_cmd.c             |    2 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c         |    2 +-
 drivers/net/wireless/mwifiex/uap_txrx.c            |    2 +-
 drivers/net/wireless/mwl8k.c                       |    2 +-
 drivers/net/wireless/orinoco/wext.c                |    4 +-
 drivers/net/wireless/p54/eeprom.c                  |    2 +-
 drivers/net/wireless/rndis_wlan.c                  |   18 +++---
 drivers/net/wireless/rt2x00/rt2400pci.c            |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c            |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c            |    2 +-
 drivers/net/wireless/rt2x00/rt2800lib.c            |    8 ++--
 drivers/net/wireless/rt2x00/rt61pci.c              |    2 +-
 drivers/net/wireless/rt2x00/rt73usb.c              |    2 +-
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |    4 +-
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |    4 +-
 drivers/net/wireless/rtlwifi/base.c                |    6 +-
 drivers/net/wireless/rtlwifi/cam.c                 |    2 +-
 drivers/net/wireless/rtlwifi/pci.c                 |    8 ++--
 drivers/net/wireless/rtlwifi/rc.c                  |    4 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |    4 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |    4 +-
 drivers/net/wireless/rtlwifi/usb.c                 |   12 ++--
 drivers/net/wireless/ti/wl1251/main.c              |   12 ++--
 drivers/net/wireless/ti/wlcore/cmd.c               |    2 +-
 drivers/net/wireless/ti/wlcore/main.c              |    6 +-
 drivers/net/wireless/ti/wlcore/tx.c                |    2 +-
 drivers/net/wireless/wl3501_cs.c                   |    2 +-
 drivers/net/wireless/zd1211rw/zd_mac.c             |    2 +-
 drivers/of/of_net.c                                |    6 +-
 drivers/parisc/led.c                               |    2 +-
 drivers/s390/net/qeth_l2_main.c                    |    4 +-
 drivers/scsi/bnx2fc/bnx2fc_els.c                   |    4 +-
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c                  |    2 +-
 drivers/scsi/fcoe/fcoe.c                           |   12 ++--
 drivers/scsi/fcoe/fcoe_ctlr.c                      |    8 ++--
 drivers/scsi/fnic/fnic_fcs.c                       |    6 +-
 drivers/staging/ccg/u_ether.c                      |    6 +-
 drivers/staging/csr/sme_wext.c                     |    2 +-
 drivers/staging/et131x/et131x.c                    |    4 +-
 drivers/staging/gdm72xx/gdm_wimax.c                |    2 +-
 drivers/staging/octeon/ethernet.c                  |    2 +-
 drivers/staging/ozwpan/ozcdev.c                    |    2 +-
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |    2 +-
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |    2 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    2 +-
 drivers/staging/rtl8187se/r8180_core.c             |    2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c       |    6 +-
 drivers/staging/rtl8192e/rtl819x_TSProc.c          |    2 +-
 drivers/staging/rtl8192e/rtllib_rx.c               |    8 ++--
 drivers/staging/rtl8192e/rtllib_softmac.c          |    4 +-
 drivers/staging/rtl8192e/rtllib_softmac_wx.c       |    4 +-
 drivers/staging/rtl8192e/rtllib_tx.c               |   12 ++--
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c  |    4 +-
 .../staging/rtl8192u/ieee80211/ieee80211_softmac.c |    2 +-
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c      |    2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |   12 ++--
 .../staging/rtl8192u/ieee80211/rtl819x_TSProc.c    |    2 +-
 drivers/staging/rtl8192u/r8192U_core.c             |    8 ++--
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c      |    2 +-
 drivers/staging/rtl8712/rtl871x_ioctl_set.c        |    2 +-
 drivers/staging/rtl8712/rtl871x_mlme.c             |    2 +-
 drivers/staging/rtl8712/rtl871x_recv.c             |    8 ++--
 drivers/staging/slicoss/slicoss.c                  |    2 +-
 drivers/staging/vt6655/bssdb.c                     |    2 +-
 drivers/staging/vt6655/card.c                      |    2 +-
 drivers/staging/vt6655/device_main.c               |    2 +-
 drivers/staging/vt6655/dpc.c                       |    4 +-
 drivers/staging/vt6655/hostap.c                    |    4 +-
 drivers/staging/vt6655/iwctl.c                     |    2 +-
 drivers/staging/vt6655/key.c                       |    2 +-
 drivers/staging/vt6655/mib.c                       |    8 ++--
 drivers/staging/vt6655/rxtx.c                      |   10 ++--
 drivers/staging/vt6655/wpactl.c                    |    4 +-
 drivers/staging/vt6656/bssdb.c                     |    2 +-
 drivers/staging/vt6656/dpc.c                       |    4 +-
 drivers/staging/vt6656/hostap.c                    |    4 +-
 drivers/staging/vt6656/iwctl.c                     |    2 +-
 drivers/staging/vt6656/key.c                       |    2 +-
 drivers/staging/vt6656/rxtx.c                      |   14 +++---
 drivers/staging/vt6656/wpactl.c                    |    2 +-
 drivers/staging/wlags49_h2/wl_wext.c               |    2 +-
 drivers/usb/gadget/u_ether.c                       |    6 +-
 drivers/uwb/address.c                              |    2 +-
 include/linux/etherdevice.h                        |   36 ++++++++-----
 include/linux/in.h                                 |   40 ++++++++++----
 include/linux/lockd/lockd.h                        |    4 +-
 include/net/llc_if.h                               |    4 +-
 include/net/sctp/constants.h                       |   12 ++--
 net/802/stp.c                                      |    4 +-
 net/8021q/vlan_dev.c                               |    6 +-
 net/8021q/vlan_netlink.c                           |    2 +-
 net/batman-adv/bat_iv_ogm.c                        |    2 +-
 net/batman-adv/bridge_loop_avoidance.c             |    8 ++--
 net/batman-adv/routing.c                           |   20 ++++----
 net/batman-adv/soft-interface.c                    |    4 +-
 net/batman-adv/unicast.c                           |    2 +-
 net/batman-adv/vis.c                               |    4 +-
 net/bridge/br_device.c                             |    6 +-
 net/bridge/br_fdb.c                                |    2 +-
 net/bridge/br_if.c                                 |    2 +-
 net/bridge/br_input.c                              |    8 ++--
 net/bridge/br_multicast.c                          |    4 +-
 net/bridge/br_netlink.c                            |    2 +-
 net/core/netpoll.c                                 |    2 +-
 net/core/pktgen.c                                  |   14 +++---
 net/core/rtnetlink.c                               |    2 +-
 net/dsa/slave.c                                    |    2 +-
 net/ethernet/eth.c                                 |    6 +-
 net/ipv4/arp.c                                     |    4 +-
 net/ipv4/datagram.c                                |    2 +-
 net/ipv4/devinet.c                                 |    4 +-
 net/ipv4/fib_frontend.c                            |   12 ++--
 net/ipv4/igmp.c                                    |   12 ++--
 net/ipv4/ip_gre.c                                  |   22 ++++----
 net/ipv4/ipmr.c                                    |    4 +-
 net/ipv4/netfilter/ipt_rpfilter.c                  |   10 ++--
 net/ipv4/ping.c                                    |    2 +-
 net/ipv4/raw.c                                     |    2 +-
 net/ipv4/route.c                                   |   58 ++++++++++----------
 net/ipv4/udp.c                                     |    2 +-
 net/ipv6/addrconf.c                                |   12 ++--
 net/ipv6/ip6_gre.c                                 |    2 +-
 net/l2tp/l2tp_ip.c                                 |    2 +-
 net/l2tp/l2tp_ip6.c                                |    2 +-
 net/mac80211/cfg.c                                 |    2 +-
 net/mac80211/ibss.c                                |    8 ++--
 net/mac80211/ieee80211_i.h                         |    2 +-
 net/mac80211/iface.c                               |   12 ++--
 net/mac80211/mesh.c                                |    2 +-
 net/mac80211/mesh_hwmp.c                           |    4 +-
 net/mac80211/mesh_pathtbl.c                        |    4 +-
 net/mac80211/mesh_plink.c                          |    2 +-
 net/mac80211/mlme.c                                |    4 +-
 net/mac80211/rx.c                                  |   50 +++++++++---------
 net/mac80211/sta_info.c                            |    2 +-
 net/mac80211/status.c                              |    6 +-
 net/mac80211/tx.c                                  |   22 ++++----
 net/mac80211/wme.c                                 |    4 +-
 net/netfilter/ipvs/ip_vs_xmit.c                    |    6 +-
 net/netfilter/xt_cluster.c                         |    2 +-
 net/netfilter/xt_pkttype.c                         |    2 +-
 net/openvswitch/flow.c                             |    4 +-
 net/openvswitch/vport-internal_dev.c               |    2 +-
 net/sctp/protocol.c                                |   10 ++--
 net/wireless/core.c                                |    2 +-
 net/wireless/ibss.c                                |    2 +-
 net/wireless/nl80211.c                             |    4 +-
 net/wireless/util.c                                |    4 +-
 net/wireless/wext-compat.c                         |    2 +-
 net/wireless/wext-sme.c                            |    2 +-
 331 files changed, 833 insertions(+), 809 deletions(-)

-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply

* [GIT PULL] Renesas ARM-based SoC defconfig for v3.8
From: Simon Horman @ 2012-10-19  3:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121018081310.GA27117@verge.net.au>

On Thu, Oct 18, 2012 at 05:13:10PM +0900, Simon Horman wrote:
> On Thu, Oct 18, 2012 at 07:29:30AM +0000, Arnd Bergmann wrote:
> > On Thursday 18 October 2012 09:58:11 Simon Horman wrote:
> > > On Wed, Oct 17, 2012 at 01:42:29PM +0000, Arnd Bergmann wrote:
> > > > On Wednesday 17 October 2012, Simon Horman wrote:
> > > > > Hi Olof, Hi Arnd,
> > > > > 
> > > > > please consider the following defconfig enhancements for 3.8.
> > > > 
> > > > These look good to me, but I wonder what happened to the plan to reduce
> > > > the number of defconfig files we discussed before. Since you can build
> > > > a combined kernel that runs on all (or most) of the supported boards,
> > > > can you add a combined shmobile_defconfig that is able to work on
> > > > a wide variety of hardware and drop some of the less common defconfig
> > > > files?
> > > > 
> > > > Most of the modern platforms nowadays have just one defconfig that
> > > > covers everything.
> > > 
> > > Hi Arnd,
> > > 
> > > I wonder if such consolidation only makes sense for boards that
> > > make use of DT. If so, I can see that we may be able to come
> > > up with a single configuration for the Armadillo800eva, KZM9G
> > > and KZM9D boards. But not for older boards such as the Mackerel which
> > > have not been converted to use DT.
> > 
> > Usually you should just be able to enable any boards together,
> > independent of whether they are using DT or not. It's possible
> > that shmobile does something different from the other platforms
> > that I'm not aware of, of course. If you look at e.g.
> > omap2plus_defconfig or imx_v6_v7_defconfig, they both enable
> > all the available boards.
> 
> Thanks, I'll see what I can do within the scope of the boards
> that I have access to.
> 
> > > I am also wondering if more of the drivers that SH Mobile uses need to
> > > become DT aware before a consolidated configuration can work.  In
> > > particular, I am thinking about the SCI serial driver and the location of
> > > the serial port that can be used for serial console and early printk - this
> > > features in the kernel command line of the per-board defconfigs and is
> > > relied on by developers.
> > 
> > Device drivers that don't use DT should get their configuration from
> > platform_data. The command line can be used to override those, but it's
> > also normally passed by the boot loader, which also has to configure
> > e.g. how much memory is present or which uart to use.
> 
> Understood.

I have made a limited amount of progress on this trying to create a
defconfig that will work on both the Marzen and Armadillo 800 EVA boards.

* Serial console appears to work, although for the Marzen at
  least enabling earlyprintk seems to require the bootloader to specify
  e.g.  console=ttySC2,115200 earlyprintk

  This is done by fully specifying bootargs in U-Boot.
  The boodloaders on the Marzen board has an ampty bootargs by default.

  I guess I can live without earlyprink by default,
  though it does seem to be a regression in the user experience.

* A more significant problem seems to be the use of CONFIG_MEMORY_START
  to define PLAT_PHYS_OFFSET in arch/arm/mach-shmobile/include/mach/memory.h

  I'm not sure that I see an easy way to get around this one.

^ permalink raw reply

* [PATCH 01/10] pinctrl: use postcore_initcall
From: Haojian Zhuang @ 2012-10-19  2:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121019023818.GO30550@atomide.com>

On Fri, Oct 19, 2012 at 10:38 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Haojian Zhuang <haojian.zhuang@gmail.com> [121018 19:17]:
>> On Fri, Oct 19, 2012 at 6:28 AM, Tony Lindgren <tony@atomide.com> wrote:
>> >
>> > Specifically could you decribe the cases where this issue happens?
>> > Also check if one of your client drivers has some early initcall
>> > that's no longer needed.
>>
>> Yes, the special case is PMIC. Most of PMIC are based on I2C/SPI bus.
>> It means that I2C/SPI bus driver should be initialized firstly. For example,
>> we could find that PMIC mfd driver are initialized in subsys init call level.
>> It means that pinctrl should be initialized earlier than I2C/SPI bus driver.
>> Otherwise, pins of I2C bus may not be configured as I2C function since
>> pinctrl driver is module init call level.
>
> Hmm, the order in drivers/Makefile is already:
>
> pinctrl/
> i2c/
>
> Maybe check that your i2c drivers don't have non-standard initcalls?
>
> Also the i2c drivers may need to return -EPROBE_DEFER?
>
> Regards,
>
> Tony

OK. I'll support -EPROBE_DEFER if failed to get pin from pinctrl system.
This solution could also resolve the issue.

Regards
Haojian

^ permalink raw reply

* [PATCH 7/7] ARM: dts: Add pin controller node for Samsung EXYNOS5440 SoC
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

From: Thomas Abraham <thomas.abraham@linaro.org>

Add a pin controller node for Samsung Exynos5440 (EXYNOS5440) SoC.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440.dtsi |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 380a89a..a7cda84 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -90,6 +90,23 @@
 		reg = <0xE0000 0x1000>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#gpio-cells = <2>;
+
+		fan: fan {
+			samsung,exynos5440-pin-function = <1>;
+		};
+
+		hdd_led0: hdd_led0 {
+			samsung,exynos5440-pin-function = <2>;
+		};
+
+		hdd_led1: hdd_led1 {
+			samsung,exynos5440-pin-function = <3>;
+		};
+
+		uart1: uart1 {
+			samsung,exynos5440-pin-function = <4>;
+		};
 	};
 
 	i2c at F0000 {
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 6/7] pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

From: Thomas Abraham <thomas.abraham@linaro.org>

Add a new pinctrl driver for Samsung EXYNOS5440 SoC. The pin controller
module in EXYNOS5440 is different from the pin controller found on other
Samsung SoC. Hence, the pin controller driver for EXYNOS5440 SoC is
independent of the Samsung pinctrl framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 drivers/pinctrl/Kconfig              |    5 +
 drivers/pinctrl/Makefile             |    1 +
 drivers/pinctrl/pinctrl-exynos5440.c |  919 ++++++++++++++++++++++++++++++++++
 3 files changed, 925 insertions(+), 0 deletions(-)
 create mode 100644 drivers/pinctrl/pinctrl-exynos5440.c

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 7bf914d..ddb201d 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -186,6 +186,11 @@ config PINCTRL_EXYNOS4
 	bool "Pinctrl driver data for Exynos4 SoC"
 	select PINCTRL_SAMSUNG
 
+config PINCTRL_EXYNOS5440
+	bool "Samsung EXYNOS5440 SoC pinctrl driver"
+	select PINMUX
+	select PINCONF
+
 config PINCTRL_MVEBU
 	bool
 	depends on ARCH_MVEBU
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index f395ba5..476928b 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
 obj-$(CONFIG_PINCTRL_COH901)	+= pinctrl-coh901.o
 obj-$(CONFIG_PINCTRL_SAMSUNG)	+= pinctrl-samsung.o
 obj-$(CONFIG_PINCTRL_EXYNOS4)	+= pinctrl-exynos.o
+obj-$(CONFIG_PINCTRL_EXYNOS5440)	+= pinctrl-exynos5440.o
 obj-$(CONFIG_PINCTRL_MVEBU)	+= pinctrl-mvebu.o
 obj-$(CONFIG_PINCTRL_DOVE)	+= pinctrl-dove.o
 obj-$(CONFIG_PINCTRL_KIRKWOOD)	+= pinctrl-kirkwood.o
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
new file mode 100644
index 0000000..b8635f6
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-exynos5440.c
@@ -0,0 +1,919 @@
+/*
+ * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's EXYNOS5440 SoC.
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/gpio.h>
+#include <linux/device.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+#include <linux/pinctrl/pinconf.h>
+#include "core.h"
+
+/* EXYNOS5440 GPIO and Pinctrl register offsets */
+#define GPIO_MUX		0x00
+#define GPIO_IE			0x04
+#define GPIO_INT		0x08
+#define GPIO_TYPE		0x0C
+#define GPIO_VAL		0x10
+#define GPIO_OE			0x14
+#define GPIO_IN			0x18
+#define GPIO_PE			0x1C
+#define GPIO_PS			0x20
+#define GPIO_SR			0x24
+#define GPIO_DS0		0x28
+#define GPIO_DS1		0x2C
+
+#define EXYNOS5440_MAX_PINS		23
+#define PIN_NAME_LENGTH		10
+
+#define GROUP_SUFFIX		"-grp"
+#define GSUFFIX_LEN		sizeof(GROUP_SUFFIX)
+#define FUNCTION_SUFFIX		"-mux"
+#define FSUFFIX_LEN		sizeof(FUNCTION_SUFFIX)
+
+/*
+ * pin configuration type and its value are packed together into a 16-bits.
+ * The upper 8-bits represent the configuration type and the lower 8-bits
+ * hold the value of the configuration type.
+ */
+#define PINCFG_TYPE_MASK		0xFF
+#define PINCFG_VALUE_SHIFT		8
+#define PINCFG_VALUE_MASK		(0xFF << PINCFG_VALUE_SHIFT)
+#define PINCFG_PACK(type, value)	(((value) << PINCFG_VALUE_SHIFT) | type)
+#define PINCFG_UNPACK_TYPE(cfg)		((cfg) & PINCFG_TYPE_MASK)
+#define PINCFG_UNPACK_VALUE(cfg)	(((cfg) & PINCFG_VALUE_MASK) >> \
+						PINCFG_VALUE_SHIFT)
+
+/**
+ * enum pincfg_type - possible pin configuration types supported.
+ * @PINCFG_TYPE_PUD: Pull up/down configuration.
+ * @PINCFG_TYPE_DRV: Drive strength configuration.
+ * @PINCFG_TYPE_SKEW_RATE: Skew rate configuration.
+ * @PINCFG_TYPE_INPUT_TYPE: Pin input type configuration.
+ */
+enum pincfg_type {
+	PINCFG_TYPE_PUD,
+	PINCFG_TYPE_DRV,
+	PINCFG_TYPE_SKEW_RATE,
+	PINCFG_TYPE_INPUT_TYPE
+};
+
+/**
+ * struct exynos5440_pin_group: represent group of pins for pincfg setting.
+ * @name: name of the pin group, used to lookup the group.
+ * @pins: the pins included in this group.
+ * @num_pins: number of pins included in this group.
+ */
+struct exynos5440_pin_group {
+	const char		*name;
+	const unsigned int	*pins;
+	u8			num_pins;
+};
+
+/**
+ * struct exynos5440_pmx_func: represent a pin function.
+ * @name: name of the pin function, used to lookup the function.
+ * @groups: one or more names of pin groups that provide this function.
+ * @num_groups: number of groups included in @groups.
+ * @function: the function number to be programmed when selected.
+ */
+struct exynos5440_pmx_func {
+	const char		*name;
+	const char		**groups;
+	u8			num_groups;
+	unsigned long		function;
+};
+
+/**
+ * struct exynos5440_pinctrl_priv_data: driver's private runtime data.
+ * @reg_base: ioremapped based address of the register space.
+ * @gc: gpio chip registered with gpiolib.
+ * @pin_groups: list of pin groups parsed from device tree.
+ * @nr_groups: number of pin groups available.
+ * @pmx_functions: list of pin functions parsed from device tree.
+ * @nr_functions: number of pin functions available.
+ */
+struct exynos5440_pinctrl_priv_data {
+	void __iomem			*reg_base;
+	struct gpio_chip		*gc;
+
+	const struct exynos5440_pin_group	*pin_groups;
+	unsigned int			nr_groups;
+	const struct exynos5440_pmx_func	*pmx_functions;
+	unsigned int			nr_functions;
+};
+
+/* list of all possible config options supported */
+struct pin_config {
+	char		*prop_cfg;
+	unsigned int	cfg_type;
+} pcfgs[] = {
+	{ "samsung,exynos5440-pin-pud", PINCFG_TYPE_PUD },
+	{ "samsung,exynos5440-pin-drv", PINCFG_TYPE_DRV },
+	{ "samsung,exynos5440-pin-skew-rate", PINCFG_TYPE_SKEW_RATE },
+	{ "samsung,exynos5440-pin-input-type", PINCFG_TYPE_INPUT_TYPE },
+};
+
+/* check if the selector is a valid pin group selector */
+static int exynos5440_get_group_count(struct pinctrl_dev *pctldev)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	return priv->nr_groups;
+}
+
+/* return the name of the group selected by the group selector */
+static const char *exynos5440_get_group_name(struct pinctrl_dev *pctldev,
+						unsigned selector)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	return priv->pin_groups[selector].name;
+}
+
+/* return the pin numbers associated with the specified group */
+static int exynos5440_get_group_pins(struct pinctrl_dev *pctldev,
+		unsigned selector, const unsigned **pins, unsigned *num_pins)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	*pins = priv->pin_groups[selector].pins;
+	*num_pins = priv->pin_groups[selector].num_pins;
+	return 0;
+}
+
+/* create pinctrl_map entries by parsing device tree nodes */
+static int exynos5440_dt_node_to_map(struct pinctrl_dev *pctldev,
+			struct device_node *np, struct pinctrl_map **maps,
+			unsigned *nmaps)
+{
+	struct device *dev = pctldev->dev;
+	struct pinctrl_map *map;
+	unsigned long *cfg = NULL;
+	char *gname, *fname;
+	int cfg_cnt = 0, map_cnt = 0, idx = 0;
+
+	/* count the number of config options specfied in the node */
+	for (idx = 0; idx < ARRAY_SIZE(pcfgs); idx++)
+		if (of_find_property(np, pcfgs[idx].prop_cfg, NULL))
+			cfg_cnt++;
+
+	/*
+	 * Find out the number of map entries to create. All the config options
+	 * can be accomadated into a single config map entry.
+	 */
+	if (cfg_cnt)
+		map_cnt = 1;
+	if (of_find_property(np, "samsung,exynos5440-pin-function", NULL))
+		map_cnt++;
+	if (!map_cnt) {
+		dev_err(dev, "node %s does not have either config or function "
+				"configurations\n", np->name);
+		return -EINVAL;
+	}
+
+	/* Allocate memory for pin-map entries */
+	map = kzalloc(sizeof(*map) * map_cnt, GFP_KERNEL);
+	if (!map) {
+		dev_err(dev, "could not alloc memory for pin-maps\n");
+		return -ENOMEM;
+	}
+	*nmaps = 0;
+
+	/*
+	 * Allocate memory for pin group name. The pin group name is derived
+	 * from the node name from which these map entries are be created.
+	 */
+	gname = kzalloc(strlen(np->name) + GSUFFIX_LEN, GFP_KERNEL);
+	if (!gname) {
+		dev_err(dev, "failed to alloc memory for group name\n");
+		goto free_map;
+	}
+	sprintf(gname, "%s%s", np->name, GROUP_SUFFIX);
+
+	/*
+	 * don't have config options? then skip over to creating function
+	 * map entries.
+	 */
+	if (!cfg_cnt)
+		goto skip_cfgs;
+
+	/* Allocate memory for config entries */
+	cfg = kzalloc(sizeof(*cfg) * cfg_cnt, GFP_KERNEL);
+	if (!cfg) {
+		dev_err(dev, "failed to alloc memory for configs\n");
+		goto free_gname;
+	}
+
+	/* Prepare a list of config settings */
+	for (idx = 0, cfg_cnt = 0; idx < ARRAY_SIZE(pcfgs); idx++) {
+		u32 value;
+		if (!of_property_read_u32(np, pcfgs[idx].prop_cfg, &value))
+			cfg[cfg_cnt++] =
+				PINCFG_PACK(pcfgs[idx].cfg_type, value);
+	}
+
+	/* create the config map entry */
+	map[*nmaps].data.configs.group_or_pin = gname;
+	map[*nmaps].data.configs.configs = cfg;
+	map[*nmaps].data.configs.num_configs = cfg_cnt;
+	map[*nmaps].type = PIN_MAP_TYPE_CONFIGS_GROUP;
+	*nmaps += 1;
+
+skip_cfgs:
+	/* create the function map entry */
+	if (of_find_property(np, "samsung,exynos5440-pin-function", NULL)) {
+		fname = kzalloc(strlen(np->name) + FSUFFIX_LEN,	GFP_KERNEL);
+		if (!fname) {
+			dev_err(dev, "failed to alloc memory for func name\n");
+			goto free_cfg;
+		}
+		sprintf(fname, "%s%s", np->name, FUNCTION_SUFFIX);
+
+		map[*nmaps].data.mux.group = gname;
+		map[*nmaps].data.mux.function = fname;
+		map[*nmaps].type = PIN_MAP_TYPE_MUX_GROUP;
+		*nmaps += 1;
+	}
+
+	*maps = map;
+	return 0;
+
+free_cfg:
+	kfree(cfg);
+free_gname:
+	kfree(gname);
+free_map:
+	kfree(map);
+	return -ENOMEM;
+}
+
+/* free the memory allocated to hold the pin-map table */
+static void exynos5440_dt_free_map(struct pinctrl_dev *pctldev,
+			     struct pinctrl_map *map, unsigned num_maps)
+{
+	int idx;
+
+	for (idx = 0; idx < num_maps; idx++) {
+		if (map[idx].type == PIN_MAP_TYPE_MUX_GROUP) {
+			kfree(map[idx].data.mux.function);
+			if (!idx)
+				kfree(map[idx].data.mux.group);
+		} else if (map->type == PIN_MAP_TYPE_CONFIGS_GROUP) {
+			kfree(map[idx].data.configs.configs);
+			if (!idx)
+				kfree(map[idx].data.configs.group_or_pin);
+		}
+	};
+
+	kfree(map);
+}
+
+/* list of pinctrl callbacks for the pinctrl core */
+static struct pinctrl_ops exynos5440_pctrl_ops = {
+	.get_groups_count	= exynos5440_get_group_count,
+	.get_group_name		= exynos5440_get_group_name,
+	.get_group_pins		= exynos5440_get_group_pins,
+	.dt_node_to_map		= exynos5440_dt_node_to_map,
+	.dt_free_map		= exynos5440_dt_free_map,
+};
+
+/* check if the selector is a valid pin function selector */
+static int exynos5440_get_functions_count(struct pinctrl_dev *pctldev)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	return priv->nr_functions;
+}
+
+/* return the name of the pin function specified */
+static const char *exynos5440_pinmux_get_fname(struct pinctrl_dev *pctldev,
+						unsigned selector)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	return priv->pmx_functions[selector].name;
+}
+
+/* return the groups associated for the specified function selector */
+static int exynos5440_pinmux_get_groups(struct pinctrl_dev *pctldev,
+		unsigned selector, const char * const **groups,
+		unsigned * const num_groups)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	*groups = priv->pmx_functions[selector].groups;
+	*num_groups = priv->pmx_functions[selector].num_groups;
+	return 0;
+}
+
+/* enable or disable a pinmux function */
+static void exynos5440_pinmux_setup(struct pinctrl_dev *pctldev, unsigned selector,
+					unsigned group, bool enable)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+	void __iomem *base;
+	u32 function;
+	u32 data;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	base = priv->reg_base;
+	function = priv->pmx_functions[selector].function;
+
+	data = readl(base + GPIO_MUX);
+	if (enable)
+		data |= (1 << function);
+	else
+		data &= ~(1 << function);
+	writel(data, base + GPIO_MUX);
+}
+
+/* enable a specified pinmux by writing to registers */
+static int exynos5440_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector,
+					unsigned group)
+{
+	exynos5440_pinmux_setup(pctldev, selector, group, true);
+	return 0;
+}
+
+/* disable a specified pinmux by writing to registers */
+static void exynos5440_pinmux_disable(struct pinctrl_dev *pctldev,
+					unsigned selector, unsigned group)
+{
+	exynos5440_pinmux_setup(pctldev, selector, group, false);
+}
+
+/*
+ * The calls to gpio_direction_output() and gpio_direction_input()
+ * leads to this function call (via the pinctrl_gpio_direction_{input|output}()
+ * function called from the gpiolib interface).
+ */
+static int exynos5440_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev,
+		struct pinctrl_gpio_range *range, unsigned offset, bool input)
+{
+	return 0;
+}
+
+/* list of pinmux callbacks for the pinmux vertical in pinctrl core */
+static struct pinmux_ops exynos5440_pinmux_ops = {
+	.get_functions_count	= exynos5440_get_functions_count,
+	.get_function_name	= exynos5440_pinmux_get_fname,
+	.get_function_groups	= exynos5440_pinmux_get_groups,
+	.enable			= exynos5440_pinmux_enable,
+	.disable		= exynos5440_pinmux_disable,
+	.gpio_set_direction	= exynos5440_pinmux_gpio_set_direction,
+};
+
+/* set the pin config settings for a specified pin */
+static int exynos5440_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
+				unsigned long config)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+	void __iomem *base;
+	enum pincfg_type cfg_type = PINCFG_UNPACK_TYPE(config);
+	u32 cfg_value = PINCFG_UNPACK_VALUE(config);
+	u32 data;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	base = priv->reg_base;
+
+	switch (cfg_type) {
+	case PINCFG_TYPE_PUD:
+		/* first set pull enable/disable bit */
+		data = readl(base + GPIO_PE);
+		data &= ~(1 << pin);
+		if (cfg_value)
+			data |= (1 << pin);
+		writel(data, base + GPIO_PE);
+
+		/* then set pull up/down bit */
+		data = readl(base + GPIO_PS);
+		data &= ~(1 << pin);
+		if (cfg_value == 2)
+			data |= (1 << pin);
+		writel(data, base + GPIO_PS);
+		break;
+
+	case PINCFG_TYPE_DRV:
+		/* set the first bit of the drive strength */
+		data = readl(base + GPIO_DS0);
+		data &= ~(1 << pin);
+		data |= ((cfg_value & 1) << pin);
+		writel(data, base + GPIO_DS0);
+		cfg_value >>= 1;
+
+		/* set the second bit of the driver strength */
+		data = readl(base + GPIO_DS1);
+		data &= ~(1 << pin);
+		data |= ((cfg_value & 1) << pin);
+		writel(data, base + GPIO_DS1);
+		break;
+	case PINCFG_TYPE_SKEW_RATE:
+		data = readl(base + GPIO_SR);
+		data &= ~(1 << pin);
+		data |= ((cfg_value & 1) << pin);
+		writel(data, base + GPIO_SR);
+		break;
+	case PINCFG_TYPE_INPUT_TYPE:
+		data = readl(base + GPIO_TYPE);
+		data &= ~(1 << pin);
+		data |= ((cfg_value & 1) << pin);
+		writel(data, base + GPIO_TYPE);
+		break;
+	default:
+		WARN_ON(1);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/* get the pin config settings for a specified pin */
+static int exynos5440_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
+					unsigned long *config)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+	void __iomem *base;
+	enum pincfg_type cfg_type = PINCFG_UNPACK_TYPE(*config);
+	u32 data;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	base = priv->reg_base;
+
+	switch (cfg_type) {
+	case PINCFG_TYPE_PUD:
+		data = readl(base + GPIO_PE);
+		data = (data >> pin) & 1;
+		if (!data)
+			*config = 0;
+		else
+			*config = ((readl(base + GPIO_PS) >> pin) & 1) + 1;
+		break;
+	case PINCFG_TYPE_DRV:
+		data = readl(base + GPIO_DS0);
+		data = (data >> pin) & 1;
+		*config = data;
+		data = readl(base + GPIO_DS1);
+		data = (data >> pin) & 1;
+		*config |= (data << 1);
+		break;
+	case PINCFG_TYPE_SKEW_RATE:
+		data = readl(base + GPIO_SR);
+		*config = (data >> pin) & 1;
+		break;
+	case PINCFG_TYPE_INPUT_TYPE:
+		data = readl(base + GPIO_TYPE);
+		*config = (data >> pin) & 1;
+		break;
+	default:
+		WARN_ON(1);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/* set the pin config settings for a specified pin group */
+static int exynos5440_pinconf_group_set(struct pinctrl_dev *pctldev,
+			unsigned group, unsigned long config)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+	const unsigned int *pins;
+	unsigned int cnt;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	pins = priv->pin_groups[group].pins;
+
+	for (cnt = 0; cnt < priv->pin_groups[group].num_pins; cnt++)
+		exynos5440_pinconf_set(pctldev, pins[cnt], config);
+
+	return 0;
+}
+
+/* get the pin config settings for a specified pin group */
+static int exynos5440_pinconf_group_get(struct pinctrl_dev *pctldev,
+				unsigned int group, unsigned long *config)
+{
+	struct exynos5440_pinctrl_priv_data *priv;
+	const unsigned int *pins;
+
+	priv = pinctrl_dev_get_drvdata(pctldev);
+	pins = priv->pin_groups[group].pins;
+	exynos5440_pinconf_get(pctldev, pins[0], config);
+	return 0;
+}
+
+/* list of pinconfig callbacks for pinconfig vertical in the pinctrl code */
+static struct pinconf_ops exynos5440_pinconf_ops = {
+	.pin_config_get		= exynos5440_pinconf_get,
+	.pin_config_set		= exynos5440_pinconf_set,
+	.pin_config_group_get	= exynos5440_pinconf_group_get,
+	.pin_config_group_set	= exynos5440_pinconf_group_set,
+};
+
+/* gpiolib gpio_set callback function */
+static void exynos5440_gpio_set(struct gpio_chip *gc, unsigned offset, int value)
+{
+	struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev);
+	void __iomem *base = priv->reg_base;
+	u32 data;
+
+	data = readl(base + GPIO_VAL);
+	data &= ~(1 << offset);
+	if (value)
+		data |= 1 << offset;
+	writel(data, base + GPIO_VAL);
+}
+
+/* gpiolib gpio_get callback function */
+static int exynos5440_gpio_get(struct gpio_chip *gc, unsigned offset)
+{
+	struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev);
+	void __iomem *base = priv->reg_base;
+	u32 data;
+
+	data = readl(base + GPIO_IN);
+	data >>= offset;
+	data &= 1;
+	return data;
+}
+
+/* gpiolib gpio_direction_input callback function */
+static int exynos5440_gpio_direction_input(struct gpio_chip *gc, unsigned offset)
+{
+	struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev);
+	void __iomem *base = priv->reg_base;
+	u32 data;
+
+	/* first disable the data output enable on this pin */
+	data = readl(base + GPIO_OE);
+	data &= ~(1 << offset);
+	writel(data, base + GPIO_OE);
+
+	/* now enable input on this pin */
+	data =  readl(base + GPIO_IE);
+	data |= 1 << offset;
+	writel(data, base + GPIO_IE);
+	return 0;
+}
+
+/* gpiolib gpio_direction_output callback function */
+static int exynos5440_gpio_direction_output(struct gpio_chip *gc, unsigned offset,
+							int value)
+{
+	struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev);
+	void __iomem *base = priv->reg_base;
+	u32 data;
+
+	exynos5440_gpio_set(gc, offset, value);
+
+	/* first disable the data input enable on this pin */
+	data = readl(base + GPIO_IE);
+	data &= ~(1 << offset);
+	writel(data, base + GPIO_IE);
+
+	/* now enable output on this pin */
+	data =  readl(base + GPIO_OE);
+	data |= 1 << offset;
+	writel(data, base + GPIO_OE);
+	return 0;
+}
+
+/* parse the pin numbers listed in the 'samsung,exynos5440-pins' property */
+static int __init exynos5440_pinctrl_parse_dt_pins(struct platform_device *pdev,
+			struct device_node *cfg_np, unsigned int **pin_list,
+			unsigned int *npins)
+{
+	struct device *dev = &pdev->dev;
+	struct property *prop;
+
+	prop = of_find_property(cfg_np, "samsung,exynos5440-pins", NULL);
+	if (!prop)
+		return -ENOENT;
+
+	*npins = prop->length / sizeof(unsigned long);
+	if (!*npins) {
+		dev_err(dev, "invalid pin list in %s node", cfg_np->name);
+		return -EINVAL;
+	}
+
+	*pin_list = devm_kzalloc(dev, *npins * sizeof(**pin_list), GFP_KERNEL);
+	if (!*pin_list) {
+		dev_err(dev, "failed to allocate memory for pin list\n");
+		return -ENOMEM;
+	}
+
+	return of_property_read_u32_array(cfg_np, "samsung,exynos5440-pins",
+			*pin_list, *npins);
+}
+
+/*
+ * Parse the information about all the available pin groups and pin functions
+ * from device node of the pin-controller.
+ */
+static int __init exynos5440_pinctrl_parse_dt(struct platform_device *pdev,
+				struct exynos5440_pinctrl_priv_data *priv)
+{
+	struct device *dev = &pdev->dev;
+	struct device_node *dev_np = dev->of_node;
+	struct device_node *cfg_np;
+	struct exynos5440_pin_group *groups, *grp;
+	struct exynos5440_pmx_func *functions, *func;
+	unsigned *pin_list;
+	unsigned int npins, grp_cnt, func_idx = 0;
+	char *gname, *fname;
+	int ret;
+
+	grp_cnt = of_get_child_count(dev_np);
+	if (!grp_cnt)
+		return -EINVAL;
+
+	groups = devm_kzalloc(dev, grp_cnt * sizeof(*groups), GFP_KERNEL);
+	if (!groups) {
+		dev_err(dev, "failed allocate memory for ping group list\n");
+		return -EINVAL;
+	}
+	grp = groups;
+
+	functions = devm_kzalloc(dev, grp_cnt * sizeof(*functions), GFP_KERNEL);
+	if (!functions) {
+		dev_err(dev, "failed to allocate memory for function list\n");
+		return -EINVAL;
+	}
+	func = functions;
+
+	/*
+	 * Iterate over all the child nodes of the pin controller node
+	 * and create pin groups and pin function lists.
+	 */
+	for_each_child_of_node(dev_np, cfg_np) {
+		u32 function;
+
+		ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np,
+					&pin_list, &npins);
+		if (ret)
+			return ret;
+
+		/* derive pin group name from the node name */
+		gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN,
+					GFP_KERNEL);
+		if (!gname) {
+			dev_err(dev, "failed to alloc memory for group name\n");
+			return -ENOMEM;
+		}
+		sprintf(gname, "%s%s", cfg_np->name, GROUP_SUFFIX);
+
+		grp->name = gname;
+		grp->pins = pin_list;
+		grp->num_pins = npins;
+		grp++;
+
+		ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function",
+						&function);
+		if (ret)
+			continue;
+
+		/* derive function name from the node name */
+		fname = devm_kzalloc(dev, strlen(cfg_np->name) + FSUFFIX_LEN,
+					GFP_KERNEL);
+		if (!fname) {
+			dev_err(dev, "failed to alloc memory for func name\n");
+			return -ENOMEM;
+		}
+		sprintf(fname, "%s%s", cfg_np->name, FUNCTION_SUFFIX);
+
+		func->name = fname;
+		func->groups = devm_kzalloc(dev, sizeof(char *), GFP_KERNEL);
+		if (!func->groups) {
+			dev_err(dev, "failed to alloc memory for group list "
+					"in pin function");
+			return -ENOMEM;
+		}
+		func->groups[0] = gname;
+		func->num_groups = 1;
+		func->function = function;
+		func++;
+		func_idx++;
+	}
+
+	priv->pin_groups = groups;
+	priv->nr_groups = grp_cnt;
+	priv->pmx_functions = functions;
+	priv->nr_functions = func_idx;
+	return 0;
+}
+
+/* register the pinctrl interface with the pinctrl subsystem */
+static int __init exynos5440_pinctrl_register(struct platform_device *pdev,
+				struct exynos5440_pinctrl_priv_data *priv)
+{
+	struct device *dev = &pdev->dev;
+	struct pinctrl_desc *ctrldesc;
+	struct pinctrl_dev *pctl_dev;
+	struct pinctrl_pin_desc *pindesc, *pdesc;
+	struct pinctrl_gpio_range grange;
+	char *pin_names;
+	int pin, ret;
+
+	ctrldesc = devm_kzalloc(dev, sizeof(*ctrldesc), GFP_KERNEL);
+	if (!ctrldesc) {
+		dev_err(dev, "could not allocate memory for pinctrl desc\n");
+		return -ENOMEM;
+	}
+
+	ctrldesc->name = "exynos5440-pinctrl";
+	ctrldesc->owner = THIS_MODULE;
+	ctrldesc->pctlops = &exynos5440_pctrl_ops;
+	ctrldesc->pmxops = &exynos5440_pinmux_ops;
+	ctrldesc->confops = &exynos5440_pinconf_ops;
+
+	pindesc = devm_kzalloc(&pdev->dev, sizeof(*pindesc) *
+				EXYNOS5440_MAX_PINS, GFP_KERNEL);
+	if (!pindesc) {
+		dev_err(&pdev->dev, "mem alloc for pin descriptors failed\n");
+		return -ENOMEM;
+	}
+	ctrldesc->pins = pindesc;
+	ctrldesc->npins = EXYNOS5440_MAX_PINS;
+
+	/* dynamically populate the pin number and pin name for pindesc */
+	for (pin = 0, pdesc = pindesc; pin < ctrldesc->npins; pin++, pdesc++)
+		pdesc->number = pin;
+
+	/*
+	 * allocate space for storing the dynamically generated names for all
+	 * the pins which belong to this pin-controller.
+	 */
+	pin_names = devm_kzalloc(&pdev->dev, sizeof(char) * PIN_NAME_LENGTH *
+					ctrldesc->npins, GFP_KERNEL);
+	if (!pin_names) {
+		dev_err(&pdev->dev, "mem alloc for pin names failed\n");
+		return -ENOMEM;
+	}
+
+	/* for each pin, set the name of the pin */
+	for (pin = 0; pin < ctrldesc->npins; pin++) {
+		sprintf(pin_names, "gpio%02d", pin);
+		pdesc = pindesc + pin;
+		pdesc->name = pin_names;
+		pin_names += PIN_NAME_LENGTH;
+	}
+
+	ret = exynos5440_pinctrl_parse_dt(pdev, priv);
+	if (ret)
+		return ret;
+
+	pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, priv);
+	if (!pctl_dev) {
+		dev_err(&pdev->dev, "could not register pinctrl driver\n");
+		return -EINVAL;
+	}
+
+	grange.name = "exynos5440-pctrl-gpio-range";
+	grange.id = 0;
+	grange.base = 0;
+	grange.npins = EXYNOS5440_MAX_PINS;
+	grange.gc = priv->gc;
+	pinctrl_add_gpio_range(pctl_dev, &grange);
+	return 0;
+}
+
+/* register the gpiolib interface with the gpiolib subsystem */
+static int __init exynos5440_gpiolib_register(struct platform_device *pdev,
+				struct exynos5440_pinctrl_priv_data *priv)
+{
+	struct gpio_chip *gc;
+	int ret;
+
+	gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL);
+	if (!gc) {
+		dev_err(&pdev->dev, "mem alloc for gpio_chip failed\n");
+		return -ENOMEM;
+	}
+
+	priv->gc = gc;
+	gc->base = 0;
+	gc->ngpio = EXYNOS5440_MAX_PINS;
+	gc->dev = &pdev->dev;
+	gc->set = exynos5440_gpio_set;
+	gc->get = exynos5440_gpio_get;
+	gc->direction_input = exynos5440_gpio_direction_input;
+	gc->direction_output = exynos5440_gpio_direction_output;
+	gc->label = "gpiolib-exynos5440";
+	gc->owner = THIS_MODULE;
+	ret = gpiochip_add(gc);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to register gpio_chip %s, error "
+					"code: %d\n", gc->label, ret);
+		return ret;
+	}
+
+	return 0;
+}
+
+/* unregister the gpiolib interface with the gpiolib subsystem */
+static int __init exynos5440_gpiolib_unregister(struct platform_device *pdev,
+				struct exynos5440_pinctrl_priv_data *priv)
+{
+	int ret = gpiochip_remove(priv->gc);
+	if (ret) {
+		dev_err(&pdev->dev, "gpio chip remove failed\n");
+		return ret;
+	}
+	return 0;
+}
+
+static int __devinit exynos5440_pinctrl_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct exynos5440_pinctrl_priv_data *priv;
+	struct resource *res;
+	int ret;
+
+	if (!dev->of_node) {
+		dev_err(dev, "device tree node not found\n");
+		return -ENODEV;
+	}
+
+	priv = devm_kzalloc(dev, sizeof(priv), GFP_KERNEL);
+	if (!priv) {
+		dev_err(dev, "could not allocate memory for private data\n");
+		return -ENOMEM;
+	}
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res) {
+		dev_err(dev, "cannot find IO resource\n");
+		return -ENOENT;
+	}
+
+	priv->reg_base = devm_request_and_ioremap(&pdev->dev, res);
+	if (!priv->reg_base) {
+		dev_err(dev, "ioremap failed\n");
+		return -ENODEV;
+	}
+
+	ret = exynos5440_gpiolib_register(pdev, priv);
+	if (ret)
+		return ret;
+
+	ret = exynos5440_pinctrl_register(pdev, priv);
+	if (ret) {
+		exynos5440_gpiolib_unregister(pdev, priv);
+		return ret;
+	}
+
+	platform_set_drvdata(pdev, priv);
+	dev_info(dev, "EXYNOS5440 pinctrl driver registered\n");
+	return 0;
+}
+
+static const struct of_device_id exynos5440_pinctrl_dt_match[] = {
+	{ .compatible = "samsung,exynos5440-pinctrl" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, exynos5440_pinctrl_dt_match);
+
+static struct platform_driver exynos5440_pinctrl_driver = {
+	.probe		= exynos5440_pinctrl_probe,
+	.driver = {
+		.name	= "exynos5440-pinctrl",
+		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(exynos5440_pinctrl_dt_match),
+	},
+};
+
+static int __init exynos5440_pinctrl_drv_register(void)
+{
+	return platform_driver_register(&exynos5440_pinctrl_driver);
+}
+postcore_initcall(exynos5440_pinctrl_drv_register);
+
+static void __exit exynos5440_pinctrl_drv_unregister(void)
+{
+	platform_driver_unregister(&exynos5440_pinctrl_driver);
+}
+module_exit(exynos5440_pinctrl_drv_unregister);
+
+MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>");
+MODULE_DESCRIPTION("Samsung EXYNOS5440 SoC pinctrl driver");
+MODULE_LICENSE("GPL v2");
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 5/7] ARM: dts: add clock controller node for Samsung EXYNOS5440
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

From: Thomas Abraham <thomas.abraham@linaro.org>

This patch add device tree nodes for representing the clock controller
module in Samsung EXYNOS5440 SoC.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440-clock.dtsi |  143 +++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos5440-clock.dtsi

diff --git a/arch/arm/boot/dts/exynos5440-clock.dtsi b/arch/arm/boot/dts/exynos5440-clock.dtsi
new file mode 100644
index 0000000..062f29f
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5440-clock.dtsi
@@ -0,0 +1,143 @@
+/*
+ * Samsung's EXYNOS5440 SoC clock nodes
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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.
+*/
+
+/ {
+	xmu {
+		compatible = "samsung,exynos5440-xmu";
+		reg = <0x160000 0x1000>;
+
+		xtal: xtal {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-output-names = "xtal";
+			clock-frequency = <50000000>;
+		};
+
+		peri_pll: peri-pll {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-output-names = "xusbxti";
+			clock-frequency = <1000000000>;
+		};
+
+		peri_250mhz: peri-250mhz {
+			compatible = "samsung,fixed-factor-clock";
+			#clock-cells = <0>;
+			clock-output-names = "peri-250mhz";
+			clocks = <&peri_pll>;
+			clock-fixed-factor-div = <4>;
+		};
+
+		peri_200mhz: peri-200mhz {
+			compatible = "samsung,fixed-factor-clock";
+			#clock-cells = <0>;
+			clock-output-names = "peri-200mhz";
+			clocks = <&peri_pll>;
+			clock-fixed-factor-div = <5>;
+		};
+
+		peri_125mhz: peri-125mhz {
+			compatible = "samsung,fixed-factor-clock";
+			#clock-cells = <0>;
+			clock-output-names = "peri-125mhz";
+			clocks = <&peri_250mhz>;
+			clock-fixed-factor-div = <2>;
+		};
+
+		b250_clk: b250-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "b250-clk";
+			clocks = <&peri_250mhz>;
+			reg-info = <0xf4 0>;
+		};
+
+		pb0250_clk: pb0250-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "pb0250-clk";
+			clocks = <&peri_250mhz>;
+			reg-info = <0xf4 1>;
+		};
+
+		pr0250_clk: pr0250-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "pr0250-clk";
+			clocks = <&peri_250mhz>;
+			reg-info = <0xf4 2>;
+		};
+
+		pr1250_clk: pr1250-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "pr1250-clk";
+			clocks = <&peri_250mhz>;
+			reg-info = <0xf4 3>;
+		};
+
+		cs250_clk: cs250-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "cs250-clk";
+			clocks = <&peri_250mhz>;
+			reg-info = <0xf4 4>;
+		};
+
+		drex_pclk: drex-pclk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "drex-pclk";
+			clocks = <&peri_125mhz>;
+			reg-info = <0xf4 5>;
+		};
+
+		b125_pclk: b125-pclk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "b125-pclk";
+			clocks = <&peri_125mhz>;
+			reg-info = <0xf4 6>;
+		};
+
+		b200_clk: b200-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "b200-clk";
+			clocks = <&peri_200mhz>;
+			reg-info = <0xf4 7>;
+		};
+
+		sata_clk: sata-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "sata-clk";
+			clocks = <&peri_200mhz>;
+			reg-info = <0xf4 8>;
+		};
+
+		usb_clk: usb-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "usb-clk";
+			clocks = <&peri_200mhz>;
+			reg-info = <0xf4 9>;
+		};
+
+		gmac0_clk: gmac0-clk {
+			compatible = "samsung,clock-gate";
+			#clock-cells = <0>;
+			clock-output-names = "gmac0-clk";
+			clocks = <&peri_200mhz>;
+			reg-info = <0xf4 10>;
+		};
+	};
+};
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 4/7] ARM: dts: add initial dts file for EXYNOS5440, SSDK5440
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

This patch adds initial dts file for EXYNOS5440 SoC and adds the
dts file for SSDK5440 board which is a kind of reference board.
More properties will be added later.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/boot/dts/exynos5440-ssdk5440.dts |   49 ++++++++++
 arch/arm/boot/dts/exynos5440.dtsi         |  142 +++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos5440-ssdk5440.dts
 create mode 100644 arch/arm/boot/dts/exynos5440.dtsi

diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
new file mode 100644
index 0000000..82960f0
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
@@ -0,0 +1,49 @@
+/*
+ * SAMSUNG SSDK5440 board device tree source
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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.
+*/
+
+/dts-v1/;
+/include/ "exynos5440.dtsi"
+
+/ {
+	model = "SAMSUNG SSDK5440 board based on EXYNOS5440";
+	compatible = "samsung,ssdk5440", "samsung,exynos5440";
+
+	memory {
+		reg = <0x80000000 0x80000000>;
+	};
+
+	chosen {
+		bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc";
+	};
+
+	spi {
+		status = "disabled";
+	};
+
+	i2c at F0000 {
+		samsung,i2c-sda-delay = <100>;
+		samsung,i2c-max-bus-freq = <20000>;
+		gpios = <&gpb3 0 2 3 0>,
+			<&gpb3 1 2 3 0>;
+	};
+
+	i2c at 100000 {
+		status = "disabled";
+	};
+
+	watchdog {
+		status = "disabled";
+	};
+
+	rtc {
+		status = "disabled";
+	};
+};
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
new file mode 100644
index 0000000..380a89a
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -0,0 +1,142 @@
+/*
+ * SAMSUNG EXYNOS5440 SoC device tree source
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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/ "skeleton.dtsi"
+
+/ {
+	compatible = "samsung,exynos5440";
+
+	interrupt-parent = <&gic>;
+
+	gic:interrupt-controller at 2E0000 {
+		compatible = "arm,cortex-a15-gic";
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0x2E0000 0x1000>, <0x2E1000 0x1000>;
+	};
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,cortex-a15";
+			timer {
+				compatible = "arm,armv7-timer";
+				interrupts = <? ? ?>;
+				clock-frequency = <1000000>;
+			};
+		};
+		cpu at 1 {
+			compatible = "arm,cortex-a15";
+			timer {
+				compatible = "arm,armv7-timer";
+				interrupts = <1 14 0x308>;
+				clock-frequency = <1000000>;
+			};
+		};
+		cpu at 2 {
+			compatible = "arm,cortex-a15";
+			timer {
+				compatible = "arm,armv7-timer";
+				interrupts = <1 14 0x308>;
+				clock-frequency = <1000000>;
+			};
+		};
+		cpu at 3 {
+			compatible = "arm,cortex-a15";
+			timer {
+				compatible = "arm,armv7-timer";
+				interrupts = <1 14 0x308>;
+				clock-frequency = <1000000>;
+			};
+		};
+	};
+
+	common {
+		compatible = "samsung,exynos5440";
+
+	};
+
+	serial at B0000 {
+		compatible = "samsung,exynos4210-uart";
+		reg = <0xB0000 0x1000>;
+		interrupts = <0 2 0>;
+	};
+
+	serial at C0000 {
+		compatible = "samsung,exynos4210-uart";
+		reg = <0xC0000 0x1000>;
+		interrupts = <0 3 0>;
+	};
+
+	spi {
+		compatible = "samsung,exynos4210-spi";
+		reg = <0xD0000 0x1000>;
+		interrupts = <0 4 0>;
+		tx-dma-channel = <&pdma0 5>; /* preliminary */
+		rx-dma-channel = <&pdma0 4>; /* preliminary */
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	pinctrl {
+		compatible = "samsung,pinctrl-exynos5440";
+		reg = <0xE0000 0x1000>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	i2c at F0000 {
+		compatible = "samsung,s3c2440-i2c";
+		reg = <0xF0000 0x1000>;
+		interrupts = <0 5 0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	i2c at 100000 {
+		compatible = "samsung,s3c2440-i2c";
+		reg = <0x100000 0x1000>;
+		interrupts = <0 6 0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	watchdog {
+		compatible = "samsung,s3c2410-wdt";
+		reg = <0x110000 0x1000>;
+		interrupts = <0 1 0>;
+	};
+
+	amba {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "arm,amba-bus";
+		interrupt-parent = <&gic>;
+		ranges;
+
+		pdma0: pdma at 121A0000 {
+			compatible = "arm,pl330", "arm,primecell";
+			reg = <0x120000 0x1000>;
+			interrupts = <0 34 0>;
+		};
+
+		pdma1: pdma at 121B0000 {
+			compatible = "arm,pl330", "arm,primecell";
+			reg = <0x121000 0x1000>;
+			interrupts = <0 35 0>;
+		};
+	};
+
+	rtc {
+		compatible = "samsung,s3c6410-rtc";
+		reg = <0x130000 0x1000>;
+		interrupts = <0 16 0>, <0 17 0>;
+	};
+};
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 1/7] ARM: EXYNOS: add support for EXYNOS5440 SoC
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

This patch adds clock controller configuration support based on common
clock framework for Samsung EXYNOS5440.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 drivers/clk/samsung/Makefile         |    1 +
 drivers/clk/samsung/clk-exynos5440.c |   66 ++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 drivers/clk/samsung/clk-exynos5440.c

diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 69487f7..27aab2c 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -4,3 +4,4 @@
 
 obj-$(CONFIG_PLAT_SAMSUNG)	+= clk.o
 obj-$(CONFIG_ARCH_EXYNOS4)	+= clk-exynos4.o
+obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
diff --git a/drivers/clk/samsung/clk-exynos5440.c b/drivers/clk/samsung/clk-exynos5440.c
new file mode 100644
index 0000000..da3b918
--- /dev/null
+++ b/drivers/clk/samsung/clk-exynos5440.c
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * 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/clk.h>
+#include <linux/clkdev.h>
+#include <linux/io.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+
+#include "clk.h"
+
+static void __iomem *clk_base;
+
+/* register a fixed factor clock type instantiated from device tree */
+void __init samsung_of_clk_register_fixed_factor(struct device_node *np)
+{
+	struct clk *clk;
+	const char *clk_name = np->name;
+	const char *parent_name;
+	u32 mul = 1, div = 1;
+
+	of_property_read_string(np, "clock-output-names", &clk_name);
+	parent_name = of_clk_get_parent_name(np, 0);
+	of_property_read_u32(np, "clock-fixed-factor-mul", &mul);
+	of_property_read_u32(np, "clock-fixed-factor-div", &div);
+
+	clk = clk_register_fixed_factor(NULL, clk_name, parent_name, 0,
+					mul, div);
+	if (clk)
+		of_clk_add_provider(np, of_clk_src_simple_get, clk);
+}
+
+static const __initconst struct of_device_id clk_match[] = {
+	{ .compatible = "fixed-clock",
+		.data = of_fixed_clk_setup, },
+	{ .compatible = "samsung,clock-gate",
+		.data = samsung_of_clk_register_gate, },
+	{ .compatible = "samsung,fixed-factor-clock",
+		.data = samsung_of_clk_register_fixed_factor, },
+	{},
+};
+
+void __init exynos5440_of_clk_init(void)
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-xmu");
+	if (!np) {
+		pr_err("%s: clock controller node not found\n", __func__);
+		return;
+	}
+
+	clk_base = of_iomap(np, 0);
+	WARN(!clk_base, "unable to map clocks registers\n");
+
+	samsung_clk_set_ctrl_base(clk_base);
+	of_clk_init(clk_match);
+}
+
+arch_initcall(exynos5440_of_clk_init);
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 1/7] ARM: EXYNOS: add support for EXYNOS5440 SoC
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350614759-1852-1-git-send-email-kgene.kim@samsung.com>

This patch adds support for EXYNOS5440 SoC which is including
Cortex-A15 Quad cores.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-exynos/Kconfig                 |   20 ++++++
 arch/arm/mach-exynos/Makefile                |    3 +-
 arch/arm/mach-exynos/common.c                |   85 ++++++++++++++++++++++++--
 arch/arm/mach-exynos/common.h                |    2 +
 arch/arm/mach-exynos/dev-uart.c              |   14 ++++
 arch/arm/mach-exynos/include/mach/irqs.h     |    5 ++
 arch/arm/mach-exynos/include/mach/map.h      |    8 +++
 arch/arm/mach-exynos/include/mach/regs-pmu.h |    1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c       |   34 ++++++++---
 arch/arm/mach-exynos/mct.c                   |   15 +++++
 arch/arm/mach-exynos/setup-i2c0.c            |    2 +-
 arch/arm/plat-samsung/include/plat/cpu.h     |    8 +++
 arch/arm/plat-samsung/include/plat/devs.h    |    1 +
 drivers/tty/serial/samsung.c                 |    3 +-
 14 files changed, 184 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 1d0d083..c047aba 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -68,6 +68,16 @@ config SOC_EXYNOS5250
 	help
 	  Enable EXYNOS5250 SoC support
 
+config SOC_EXYNOS5440
+	bool "SAMSUNG EXYNOS5440"
+	default y
+	depends on ARCH_EXYNOS5
+	select ARM_ARCH_TIMER
+	select AUTO_ZRELADDR
+	select COMMON_CLK
+	help
+	  Enable EXYNOS5440 SoC support
+
 config EXYNOS4_MCT
 	bool
 	default y
@@ -426,6 +436,16 @@ config MACH_EXYNOS5_DT
 	  Machine support for Samsung EXYNOS5 machine with device tree enabled.
 	  Select this if a fdt blob is available for the EXYNOS5 SoC based board.
 
+config MACH_EXYNOS5440_DT
+	bool "SAMSUNG EXYNOS5440 Machine using device tree"
+	depends on ARCH_EXYNOS5
+	select ARM_AMBA
+	select SOC_EXYNOS5440
+	select USE_OF
+	help
+	  Machine support for Samsung EXYNOS5440 machine with device tree enabled.
+	  Select this if a fdt blob is available for the EXYNOS5440 SoC based board.
+
 if ARCH_EXYNOS4
 
 comment "Configuration for HSMMC 8-bit bus width"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index ad66c9f4..92df758 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -13,7 +13,7 @@ obj-				:=
 # Core
 
 obj-$(CONFIG_ARCH_EXYNOS)	+= common.o
-obj-$(CONFIG_ARCH_EXYNOS5)	+= clock-exynos5.o
+obj-$(CONFIG_SOC_EXYNOS5250)	+= clock-exynos5.o
 
 obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
+obj-$(CONFIG_MACH_EXYNOS5440_DT)	+= mach-exynos5-dt.o
 
 # device support
 
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index fea1542..786d8f4 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -57,9 +57,11 @@ static const char name_exynos4210[] = "EXYNOS4210";
 static const char name_exynos4212[] = "EXYNOS4212";
 static const char name_exynos4412[] = "EXYNOS4412";
 static const char name_exynos5250[] = "EXYNOS5250";
+static const char name_exynos5440[] = "EXYNOS5440";
 
 static void exynos4_map_io(void);
 static void exynos5_map_io(void);
+static void exynos5440_map_io(void);
 static void exynos5_init_clocks(int xtal);
 static void exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 static int exynos_init(void);
@@ -94,6 +96,13 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.init_uarts	= exynos_init_uarts,
 		.init		= exynos_init,
 		.name		= name_exynos5250,
+	}, {
+		.idcode		= EXYNOS5440_SOC_ID,
+		.idmask		= EXYNOS5_SOC_MASK,
+		.map_io		= exynos5440_map_io,
+		.init_uarts	= exynos_init_uarts,
+		.init		= exynos_init,
+		.name		= name_exynos5440,
 	},
 };
 
@@ -108,6 +117,15 @@ static struct map_desc exynos_iodesc[] __initdata = {
 	},
 };
 
+static struct map_desc exynos5440_iodesc[] __initdata = {
+	{
+		.virtual	= (unsigned long)S5P_VA_CHIPID,
+		.pfn		= __phys_to_pfn(EXYNOS5440_PA_CHIPID),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE,
+	},
+};
+
 static struct map_desc exynos4_iodesc[] __initdata = {
 	{
 		.virtual	= (unsigned long)S3C_VA_SYS,
@@ -274,6 +292,25 @@ static struct map_desc exynos5_iodesc[] __initdata = {
 	},
 };
 
+static struct map_desc exynos5440_iodesc0[] __initdata = {
+	{
+		.virtual	= (unsigned long)S3C_VA_UART,
+		.pfn		= __phys_to_pfn(EXYNOS5440_PA_UART0),
+		.length		= SZ_512K,
+		.type		= MT_DEVICE,
+	}, {
+		.virtual	= (unsigned long)S5P_VA_GIC_CPU,
+		.pfn		= __phys_to_pfn(EXYNOS5440_PA_GIC_CPU),
+		.length		= SZ_64K,
+		.type		= MT_DEVICE,
+	}, {
+		.virtual	= (unsigned long)S5P_VA_GIC_DIST,
+		.pfn		= __phys_to_pfn(EXYNOS5440_PA_GIC_DIST),
+		.length		= SZ_64K,
+		.type		= MT_DEVICE,
+	},
+};
+
 void exynos4_restart(char mode, const char *cmd)
 {
 	__raw_writel(0x1, S5P_SWRESET);
@@ -281,11 +318,29 @@ void exynos4_restart(char mode, const char *cmd)
 
 void exynos5_restart(char mode, const char *cmd)
 {
-	__raw_writel(0x1, EXYNOS_SWRESET);
+	u32 val;
+	void __iomem *addr;
+
+	if (of_machine_is_compatible("samsung,exynos5250")) {
+		val = 0x1;
+		addr = EXYNOS_SWRESET;
+	} else if (of_machine_is_compatible("samsung,exynos5440")) {
+		val = (0x10 << 20) | (0x1 << 16);
+		addr = EXYNOS5440_SWRESET;
+	} else {
+		pr_err("%s: cannot support non-DT\n", __func__);
+		return;
+	}
+
+	__raw_writel(val, addr);
 }
 
 void __init exynos_init_late(void)
 {
+	if (of_machine_is_compatible("samsung,exynos5440"))
+		/* to be supported later */
+		return;
+
 	exynos_pm_late_initcall();
 }
 
@@ -298,7 +353,11 @@ void __init exynos_init_late(void)
 void __init exynos_init_io(struct map_desc *mach_desc, int size)
 {
 	/* initialize the io descriptors we need for initialization */
-	iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
+	if (of_machine_is_compatible("samsung,exynos5440"))
+		iotable_init(exynos5440_iodesc, ARRAY_SIZE(exynos5440_iodesc));
+	else
+		iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
+
 	if (mach_desc)
 		iotable_init(mach_desc, size);
 
@@ -364,6 +423,11 @@ static void __init exynos5_map_io(void)
 	s3c_i2c2_setname("s3c2440-i2c");
 }
 
+static void __init exynos5440_map_io(void)
+{
+	iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
+}
+
 static void __init exynos5_init_clocks(int xtal)
 {
 	printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
@@ -587,6 +651,11 @@ static const struct of_device_id exynos4_dt_irq_match[] = {
 			.data = combiner_of_init, },
 	{},
 };
+
+static const struct of_device_id exynos5440_dt_irq_match[] = {
+	{ .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
+	{},
+};
 #endif
 
 void __init exynos4_init_irq(void)
@@ -616,14 +685,18 @@ void __init exynos4_init_irq(void)
 void __init exynos5_init_irq(void)
 {
 #ifdef CONFIG_OF
-	of_irq_init(exynos4_dt_irq_match);
+	if (soc_is_exynos5440())
+		of_irq_init(exynos5440_dt_irq_match);
+	else
+		of_irq_init(exynos4_dt_irq_match);
 #endif
 	/*
 	 * The parameters of s5p_init_irq() are for VIC init.
 	 * Theses parameters should be NULL and 0 because EXYNOS4
 	 * uses GIC instead of VIC.
 	 */
-	s5p_init_irq(NULL, 0);
+	if (!soc_is_exynos5440())
+		s5p_init_irq(NULL, 0);
 }
 
 struct bus_type exynos_subsys = {
@@ -646,7 +719,7 @@ static int __init exynos4_l2x0_cache_init(void)
 {
 	int ret;
 
-	if (soc_is_exynos5250())
+	if (soc_is_exynos5250() || soc_is_exynos5440())
 		return 0;
 
 	ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
@@ -714,6 +787,8 @@ static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no)
 
 	if (soc_is_exynos5250())
 		s3c24xx_init_uartdevs("exynos4210-uart", exynos5_uart_resources, cfg, no);
+	else if (soc_is_exynos5440())
+		s3c24xx_init_uartdevs("exynos4210-uart", exynos5440_uart_resources, cfg, no);
 	else
 		s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
 }
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 7a4e0ea..99b88f8 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -13,9 +13,11 @@
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
 extern struct sys_timer exynos4_timer;
+extern struct sys_timer exynos5_timer;
 
 struct map_desc;
 void exynos_init_io(struct map_desc *mach_desc, int size);
+void exynos5440_init_io(struct map_desc *mach_desc, int size);
 void exynos4_init_irq(void);
 void exynos5_init_irq(void);
 void exynos4_restart(char mode, const char *cmd);
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c
index 2e85c02..95b887f 100644
--- a/arch/arm/mach-exynos/dev-uart.c
+++ b/arch/arm/mach-exynos/dev-uart.c
@@ -76,3 +76,17 @@ struct s3c24xx_uart_resources exynos5_uart_resources[] __initdata = {
 		.nr_resources	= ARRAY_SIZE(exynos5_uart3_resource),
 	},
 };
+
+EXYNOS_UART_RESOURCE(5440, 0)
+EXYNOS_UART_RESOURCE(5440, 1)
+
+struct s3c24xx_uart_resources exynos5440_uart_resources[] __initdata = {
+	[0] = {
+		.resources	= exynos5440_uart0_resource,
+		.nr_resources	= ARRAY_SIZE(exynos5440_uart0_resource),
+	},
+	[1] = {
+		.resources	= exynos5440_uart1_resource,
+		.nr_resources	= ARRAY_SIZE(exynos5440_uart0_resource),
+	},
+};
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
index 35bced6..f43a96c 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -333,6 +333,11 @@
 #define EXYNOS5_IRQ_FIMC_LITE1		IRQ_SPI(126)
 #define EXYNOS5_IRQ_RP_TIMER		IRQ_SPI(127)
 
+/* EXYNOS5440 */
+
+#define EXYNOS5440_IRQ_UART0		IRQ_SPI(2)
+#define EXYNOS5440_IRQ_UART1		IRQ_SPI(3)
+
 #define EXYNOS5_IRQ_PMU			COMBINER_IRQ(1, 2)
 
 #define EXYNOS5_IRQ_SYSMMU_GSC0_0	COMBINER_IRQ(2, 0)
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 8480849..d0602d3 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -53,12 +53,14 @@
 #define EXYNOS4_PA_ONENAND_DMA		0x0C600000
 
 #define EXYNOS_PA_CHIPID		0x10000000
+#define EXYNOS5440_PA_CHIPID		0x00160000
 
 #define EXYNOS4_PA_SYSCON		0x10010000
 #define EXYNOS5_PA_SYSCON		0x10050100
 
 #define EXYNOS4_PA_PMU			0x10020000
 #define EXYNOS5_PA_PMU			0x10040000
+#define EXYNOS5440_PA_PMU		0x00160000
 
 #define EXYNOS4_PA_CMU			0x10030000
 #define EXYNOS5_PA_CMU			0x10010000
@@ -83,6 +85,8 @@
 #define EXYNOS4_PA_GIC_DIST		0x10490000
 #define EXYNOS5_PA_GIC_CPU		0x10482000
 #define EXYNOS5_PA_GIC_DIST		0x10481000
+#define EXYNOS5440_PA_GIC_CPU		0x002E2000
+#define EXYNOS5440_PA_GIC_DIST		0x002E1000
 
 #define EXYNOS4_PA_COREPERI		0x10500000
 #define EXYNOS4_PA_TWD			0x10500600
@@ -281,6 +285,10 @@
 #define EXYNOS5_PA_UART3		0x12C30000
 #define EXYNOS5_SZ_UART			SZ_256
 
+#define EXYNOS5440_PA_UART0		0x000B0000
+#define EXYNOS5440_PA_UART1		0x000C0000
+#define EXYNOS5440_SZ_UART		SZ_256
+
 #define S3C_VA_UARTx(x)			(S3C_VA_UART + ((x) * S3C_UART_OFFSET))
 
 #endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h
index d4e392b..c0b74f3 100644
--- a/arch/arm/mach-exynos/include/mach/regs-pmu.h
+++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h
@@ -31,6 +31,7 @@
 
 #define S5P_SWRESET				S5P_PMUREG(0x0400)
 #define EXYNOS_SWRESET				S5P_PMUREG(0x0400)
+#define EXYNOS5440_SWRESET			S5P_PMUREG(0x00C4)
 
 #define S5P_WAKEUP_STAT				S5P_PMUREG(0x0600)
 #define S5P_EINT_WAKEUP_MASK			S5P_PMUREG(0x0604)
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index db1cd8e..7052f80 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -75,20 +75,24 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
 	{},
 };
 
-static void __init exynos5250_dt_map_io(void)
+static void __init exynos5_dt_map_io(void)
 {
 	exynos_init_io(NULL, 0);
-	s3c24xx_init_clocks(24000000);
+
+	if (of_machine_is_compatible("samsung,exynos5250"))
+		s3c24xx_init_clocks(24000000);
 }
 
-static void __init exynos5250_dt_machine_init(void)
+static void __init exynos5_dt_machine_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-				exynos5250_auxdata_lookup, NULL);
+	if (of_machine_is_compatible("samsung,exynos5250"))
+		of_platform_populate(NULL, of_default_bus_match_table,
+				     exynos5250_auxdata_lookup, NULL);
 }
 
-static char const *exynos5250_dt_compat[] __initdata = {
+static char const *exynos5_dt_compat[] __initdata = {
 	"samsung,exynos5250",
+	"samsung,exynos5440",
 	NULL
 };
 
@@ -96,11 +100,23 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	.init_irq	= exynos5_init_irq,
 	.smp		= smp_ops(exynos_smp_ops),
-	.map_io		= exynos5250_dt_map_io,
+	.map_io		= exynos5_dt_map_io,
 	.handle_irq	= gic_handle_irq,
-	.init_machine	= exynos5250_dt_machine_init,
+	.init_machine	= exynos5_dt_machine_init,
 	.init_late	= exynos_init_late,
 	.timer		= &exynos4_timer,
-	.dt_compat	= exynos5250_dt_compat,
+	.dt_compat	= exynos5_dt_compat,
+	.restart        = exynos5_restart,
+MACHINE_END
+
+DT_MACHINE_START(EXYNOS5440_DT, "SAMSUNG EXYNOS5440 (Flattened Device Tree)")
+	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
+	.init_irq	= exynos5_init_irq,
+	.smp		= smp_ops(exynos_smp_ops),
+	.map_io		= exynos5_dt_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= exynos5_dt_machine_init,
+	.timer		= &exynos5_timer,
+	.dt_compat	= exynos5_dt_compat,
 	.restart        = exynos5_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index cc3805a..31f45ec 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -19,7 +19,9 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/percpu.h>
+#include <linux/of.h>
 
+#include <asm/arch_timer.h>
 #include <asm/hardware/gic.h>
 #include <asm/localtimer.h>
 
@@ -487,6 +489,9 @@ static void __init exynos4_timer_init(void)
 		exynos4x12_clk_init();
 #endif
 
+	if (of_machine_is_compatible("samsung,exynos5440"))
+		arch_timer_of_register();
+
 	if ((soc_is_exynos4210()) || (soc_is_exynos5250()))
 		mct_int_type = MCT_INT_SPI;
 	else
@@ -500,3 +505,13 @@ static void __init exynos4_timer_init(void)
 struct sys_timer exynos4_timer = {
 	.init		= exynos4_timer_init,
 };
+
+static void __init exynos5_timer_init(void)
+{
+	if (of_machine_is_compatible("samsung,exynos5440"))
+		arch_timer_of_register();
+}
+
+struct sys_timer exynos5_timer = {
+	.init		= exynos5_timer_init,
+};
diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c
index 5700f23..e2d9dfb 100644
--- a/arch/arm/mach-exynos/setup-i2c0.c
+++ b/arch/arm/mach-exynos/setup-i2c0.c
@@ -20,7 +20,7 @@ struct platform_device; /* don't need the contents */
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
-	if (soc_is_exynos5250())
+	if (soc_is_exynos5250() || soc_is_exynos5440())
 		/* will be implemented with gpio function */
 		return;
 
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index ace4451..e0072ce 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,6 +43,7 @@ extern unsigned long samsung_cpu_id;
 #define EXYNOS4_CPU_MASK	0xFFFE0000
 
 #define EXYNOS5250_SOC_ID	0x43520000
+#define EXYNOS5440_SOC_ID	0x54400000
 #define EXYNOS5_SOC_MASK	0xFFFFF000
 
 #define IS_SAMSUNG_CPU(name, id, mask)		\
@@ -62,6 +63,7 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
 IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
 IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
 IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
+IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 
 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
     defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -130,6 +132,12 @@ IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
 # define soc_is_exynos5250()	0
 #endif
 
+#if defined(CONFIG_SOC_EXYNOS5440)
+# define soc_is_exynos5440()	is_samsung_exynos5440()
+#else
+# define soc_is_exynos5440()	0
+#endif
+
 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef KHZ
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 5da4b4f..cd90038 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -28,6 +28,7 @@ extern struct s3c24xx_uart_resources s3c64xx_uart_resources[];
 extern struct s3c24xx_uart_resources s5p_uart_resources[];
 extern struct s3c24xx_uart_resources exynos4_uart_resources[];
 extern struct s3c24xx_uart_resources exynos5_uart_resources[];
+extern struct s3c24xx_uart_resources exynos5440_uart_resources[];
 
 extern struct platform_device *s3c24xx_uart_devs[];
 extern struct platform_device *s3c24xx_uart_src[];
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 7f04717..0e26a16 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1646,7 +1646,8 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
 #endif
 
 #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS4212) || \
-	defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250)
+	defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) || \
+	defined(CONFIG_SOC_EXYNOS5440)
 static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = {
 	.info = &(struct s3c24xx_uart_info) {
 		.name		= "Samsung Exynos4 UART",
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 0/7] ARM: EXYNOS: add support for new EXYNOS5440 SoC
From: Kukjin Kim @ 2012-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel

This is for adding support EXYNOS5440 SoC which is including Cortex-A15 Quad cores and SSDK5440 board.

Note: this is based on Samsung common clk work and 3rd patch for uart is wip.

[PATCH 1/7] ARM: EXYNOS: add support for EXYNOS5440 SoC
[PATCH 2/7] clk: exynos5440: add common clock support for Samsung EXYNOS5440
[PATCH 3/7] ARM: EXYNOS: add support uart for EXYNOS SoCs - WIP
[PATCH 4/7] ARM: dts: add initial dts file for EXYNOS5440, SSDK5440
[PATCH 5/7] ARM: dts: add clock controller node for Samsung EXYNOS5440
[PATCH 6/7] pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC
[PATCH 7/7] ARM: dts: Add pin controller node for Samsung EXYNOS5440 SoC

Kukjin Kim (3):
      ARM: EXYNOS: add support for EXYNOS5440 SoC
      ARM: EXYNOS: add support uart for EXYNOS SoCs - WIP
      ARM: dts: add initial dts file for EXYNOS5440, SSDK5440

Thomas Abraham (4):
      clk: exynos5440: add common clock support for Samsung EXYNOS5440
      ARM: dts: add clock controller node for Samsung EXYNOS5440
      pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC
      ARM: dts: Add pin controller node for Samsung EXYNOS5440 SoC

 arch/arm/boot/dts/exynos5440-clock.dtsi      |  143 ++++
 arch/arm/boot/dts/exynos5440-ssdk5440.dts    |   49 ++
 arch/arm/boot/dts/exynos5440.dtsi            |  159 +++++
 arch/arm/mach-exynos/Kconfig                 |   20 +
 arch/arm/mach-exynos/Makefile                |    3 +-
 arch/arm/mach-exynos/common.c                |   85 +++-
 arch/arm/mach-exynos/common.h                |    2 +
 arch/arm/mach-exynos/dev-uart.c              |   14 +
 arch/arm/mach-exynos/include/mach/irqs.h     |    5 +
 arch/arm/mach-exynos/include/mach/map.h      |    8 +
 arch/arm/mach-exynos/include/mach/regs-pmu.h |    1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c       |   34 +-
 arch/arm/mach-exynos/mct.c                   |   15 +
 arch/arm/mach-exynos/setup-i2c0.c            |    2 +-
 arch/arm/plat-samsung/include/plat/cpu.h     |    8 +
 arch/arm/plat-samsung/include/plat/devs.h    |    1 +
 drivers/clk/samsung/Makefile                 |    1 +
 drivers/clk/samsung/clk-exynos5440.c         |   66 ++
 drivers/pinctrl/Kconfig                      |    5 +
 drivers/pinctrl/Makefile                     |    1 +
 drivers/pinctrl/pinctrl-exynos5440.c         |  919 ++++++++++++++++++++++++++
 drivers/tty/serial/samsung.c                 |    3 +-
 22 files changed, 1527 insertions(+), 17 deletions(-)

^ permalink raw reply

* [PATCH 08/10] pinctrl: single: support pinconf generic
From: Tony Lindgren @ 2012-10-19  2:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAN1soZzsruhWt7VFgf5Fi79npcjLiMSUEVwnE3hR5iWEh+9GRw@mail.gmail.com>

* Haojian Zhuang <haojian.zhuang@gmail.com> [121018 19:25]:
> 
> I wonder whether gpio function in OMAP is also configured in the pinmux
> register. For example, the function is 3bit field in pinmux register
> of Marvell's
> PXA/MMP silicon. GPIO function is the one of function.
> 
> If the usage case is same in OMAP silicon, I can merge
> "pinctrl-single,gpio-mask"
> with "pinctrl-single,function-mask".
> 
> Do we need "pinctrl-single,gpio-disable" at here? I want to remove it,
> but I don't
> know whether it's necessary in OMAP case.

Maybe.. I'll take a look at at that tomorrow.

Regards,

Tony

^ permalink raw reply

* [PATCH 01/10] pinctrl: use postcore_initcall
From: Tony Lindgren @ 2012-10-19  2:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAN1soZy17wO2s7WoRSRod8k5Zh7fuUc1gxhQiHEb0=zwLhyj6A@mail.gmail.com>

* Haojian Zhuang <haojian.zhuang@gmail.com> [121018 19:17]:
> On Fri, Oct 19, 2012 at 6:28 AM, Tony Lindgren <tony@atomide.com> wrote:
> >
> > Specifically could you decribe the cases where this issue happens?
> > Also check if one of your client drivers has some early initcall
> > that's no longer needed.
> 
> Yes, the special case is PMIC. Most of PMIC are based on I2C/SPI bus.
> It means that I2C/SPI bus driver should be initialized firstly. For example,
> we could find that PMIC mfd driver are initialized in subsys init call level.
> It means that pinctrl should be initialized earlier than I2C/SPI bus driver.
> Otherwise, pins of I2C bus may not be configured as I2C function since
> pinctrl driver is module init call level.

Hmm, the order in drivers/Makefile is already:

pinctrl/
i2c/

Maybe check that your i2c drivers don't have non-standard initcalls?

Also the i2c drivers may need to return -EPROBE_DEFER?

Regards,

Tony

^ permalink raw reply

* [GIT PULL] omap plat header removal for v3.8 merge window, part1
From: Tony Lindgren @ 2012-10-19  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd & Olof,

Here's the first set of omap plat header removal for v3.8 merge
window. I have at least one more related set coming, but I wanted
to get these into linux next before driver patches add more
things for me to chase down and fix.

Oh, forgot to mention in the tag that the increase in diffstat
is mostly because plat-omap/clock shared clock code is duplicated
as that's also needed for the common clock framework patches
coming up.

Regards,

Tony


The following changes since commit ddffeb8c4d0331609ef2581d84de4d763607bd37:

  Linux 3.7-rc1 (2012-10-14 14:41:04 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.8/cleanup-headers-signed

for you to fetch changes up to e4c060db2c13f10de09101afc564763f9fd0019a:

  ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2 (2012-10-18 16:23:46 -0700)

----------------------------------------------------------------
This is the first set of omap cleanup patches for v3.8 merge
window to remove most of the remaining plat includes to get us
closer to ARM common zImage support.

To avoid a huge amount of trivial merge conflicts with includes,
this branch is based on several small topic branches coordinated
with the driver subsystem maintainers. These branches are based on
v3.7-rc1 and can also be merged into the related driver subsystem
branches as needed:

omap-for-v3.8/cleanup-headers-prepare   few trivial driver changes
omap-for-v3.8/cleanup-headers-dma       move of the DMA header
omap-for-v3.8/cleanup-headers-gpmc      GPMC and MTD changes
omap-for-v3.8/cleanup-headers-mmc       MMC related changes
omap-for-v3.8/cleanup-headers-dss       DSS related changes
omap-for-v3.8/cleanup-headers-asoc      ASoC related changes

Note that for the dma-omap.h, it was decided that it should be
is completed. For the related discussion, please see:

https://patchwork.kernel.org/patch/1519591/#

After these patches we still have a few plat headers remaining
that will be handled in later pull requests.

----------------------------------------------------------------
Afzal Mohammed (16):
      ARM: OMAP2+: nand: unify init functions
      ARM: OMAP2+: onenand: refactor for clarity
      ARM: OMAP2+: gpmc: remove cs# in sync clk div calc
      mtd: onenand: omap: cleanup gpmc dependency
      mtd: nand: omap: free region as per resource size
      mtd: nand: omap: read nand using register address
      ARM: OMAP2+: onenand: connected soc info in pdata
      mtd: onenand: omap: use pdata info instead of cpu_is
      ARM: OMAP2+: onenand: header cleanup
      ARM: OMAP2+: nand: header cleanup
      mtd: nand: omap: bring in gpmc nand macros
      ARM: OMAP2+: nand: bch capability check
      ARM: OMAP2+: gpmc: nand register helper bch update
      mtd: nand: omap: handle gpmc bch[48]
      ARM: OMAP2+: gpmc: remove exported nand functions
      ARM: OMAP2+: gpmc: localize gpmc header

Jon Hunter (1):
      ARM: OMAP2+: GPMC: Remove unused OneNAND get_freq() platform function

Lokesh Vutla (7):
      ARM: OMAP: DMA: Removing plat/dma-44xx.h
      ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1
      ARM: OMAP2+: DMA: Moving OMAP2+ DMA channel definitions to mach-omap2
      ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.h
      ARM: OMAP1: Remove omap_reserve() callback for all omap1 boards
      ARM: OMAP2+: Move omap_reserve() locally to mach-omap2
      ARM: OMAP: Move plat/omap-secure.h locally to mach-omap2

Paul Walmsley (5):
      staging: tidspbridge: remove unnecessary include of <plat/clock.h>
      ARM: OMAP: move plat-omap/include/plat/sdrc.h into mach-omap2/sdrc.h
      ARM: OMAP: duplicate plat-omap/clock.c into mach-omap[12]/clock.c
      ARM: OMAP: remove plat/clock.h
      ARM: OMAP: clock: split plat/clkdev_omap.h into OMAP1/2 files

Peter Ujfalusi (2):
      ASoC: omap-abe-twl6040: Fix typo of Vibrator
      ASoC: omap-mcpdm: Remove OMAP revision check

Tomi Valkeinen (11):
      OMAPDSS: add omapdss_version
      OMAPDSS: use omapdss_version in dss_features.c
      OMAPDSS: DISPC: use omapdss_version
      OMAPDSS: DSS: use omapdss_version
      OMAPDSS: HDMI: use omapdss_version
      OMAPDSS: remove <plat/cpu.h> includes
      OMAP: VRFB: convert vrfb to platform device
      OMAP: move arch/arm/plat-omap/include/plat/vrfb.h
      OMAP: SDRC: remove VRFB code
      OMAPDSS: VRFB: add omap_vrfb_supported()
      OMAPFB: use omap_vrfb_supported()

Tony Lindgren (23):
      ASoC: Fix wrong include for McPDM
      ARM: OMAP: Split plat/mmc.h into local headers and platform_data
      mmc: omap: Remove cpu_is_omap usage from the driver
      ARM: OMAP: Trivial driver changes to remove include plat/cpu.h
      Merge tag 'gpmc-czimage' of git://gitorious.org/x0148406-public/linux-kernel into omap-for-v3.8/cleanup-headers-gpmc
      Merge remote-tracking branch 'tomi/3.8/vrfb-conversion' into omap-for-v3.8/cleanup-headers-dss
      Merge branch 'omap-for-v3.8/cleanup-headers-dma' into omap-for-v3.8/cleanup-headers
      Merge branch 'omap-for-v3.8/cleanup-headers-gpmc' into omap-for-v3.8/cleanup-headers
      Merge branch 'omap-for-v3.8/cleanup-headers-mmc' into omap-for-v3.8/cleanup-headers
      Merge branch 'omap-for-v3.8/cleanup-headers-dss' into omap-for-v3.8/cleanup-headers
      ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap
      ARM: OMAP1: Move plat/tc.h to mach/tc.h for omap1
      ARM: OMAP2+: Make board-zoom.h local
      ARM: OMAP: Split plat-omap/i2c.c into mach-omap1 and mach-omap2
      ARM: OMAP: Make plat/common.h local to mach-omap1 and mach-omap2
      ARM: OMAP: Move plat/led.h to include/linux/platform_data
      ARM: OMAP: Make plat/sram.h local to plat-omap
      ARM: OMAP: Make omap_device local to mach-omap2
      Merge branch 'omap-for-v3.8/cleanup-headers-asoc' into omap-for-v3.8/cleanup-headers
      ARM: OMAP: Make plat/omap_hwmod.h local to mach-omap2
      ARM: OMAP: Merge plat/multi.h into plat/cpu.h
      ARM: OMAP: Make plat/omap-pm.h local to mach-omap2
      ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2

 arch/arm/mach-omap1/board-ams-delta.c              |    1 -
 arch/arm/mach-omap1/board-fsample.c                |    9 +-
 arch/arm/mach-omap1/board-generic.c                |    1 -
 arch/arm/mach-omap1/board-h2-mmc.c                 |    5 +-
 arch/arm/mach-omap1/board-h2.c                     |    6 +-
 arch/arm/mach-omap1/board-h3-mmc.c                 |    3 +-
 arch/arm/mach-omap1/board-h3.c                     |    5 +-
 arch/arm/mach-omap1/board-htcherald.c              |    3 +-
 arch/arm/mach-omap1/board-innovator.c              |   31 +-
 arch/arm/mach-omap1/board-nokia770.c               |    5 +-
 arch/arm/mach-omap1/board-osk.c                    |    3 +-
 arch/arm/mach-omap1/board-palmte.c                 |    6 +-
 arch/arm/mach-omap1/board-palmtt.c                 |    8 +-
 arch/arm/mach-omap1/board-palmz71.c                |    6 +-
 arch/arm/mach-omap1/board-perseus2.c               |    9 +-
 arch/arm/mach-omap1/board-sx1-mmc.c                |    3 +-
 arch/arm/mach-omap1/board-sx1.c                    |    6 +-
 arch/arm/mach-omap1/board-voiceblue.c              |    3 +-
 arch/arm/mach-omap1/clock.c                        |  506 +++++++++++++++++-
 arch/arm/mach-omap1/clock.h                        |  178 ++++++-
 arch/arm/mach-omap1/clock_data.c                   |   17 +-
 arch/arm/mach-omap1/common.h                       |    6 +-
 arch/arm/mach-omap1/devices.c                      |   15 +-
 arch/arm/mach-omap1/dma.c                          |    6 +-
 arch/arm/mach-omap1/dma.h                          |   83 +++
 arch/arm/mach-omap1/flash.c                        |    2 +-
 arch/arm/mach-omap1/fpga.c                         |    2 +-
 arch/arm/mach-omap1/i2c.c                          |   61 ++-
 arch/arm/mach-omap1/id.c                           |    2 +-
 arch/arm/mach-omap1/include/mach/hardware.h        |    4 +-
 arch/arm/mach-omap1/include/mach/memory.h          |    2 +-
 arch/arm/mach-omap1/include/mach/omap1510.h        |  113 ++++
 .../include/plat => mach-omap1/include/mach}/tc.h  |    0
 arch/arm/mach-omap1/io.c                           |    4 +-
 arch/arm/mach-omap1/irq.c                          |    2 +-
 arch/arm/mach-omap1/lcd_dma.c                      |    4 +-
 arch/arm/mach-omap1/mcbsp.c                        |    5 +-
 arch/arm/mach-omap1/mmc.h                          |   18 +
 arch/arm/mach-omap1/opp_data.c                     |    2 +-
 arch/arm/mach-omap1/pm.c                           |   10 +-
 arch/arm/mach-omap1/pm_bus.c                       |    3 -
 arch/arm/mach-omap1/serial.c                       |    1 -
 arch/arm/mach-omap1/soc.h                          |  229 ++++++++
 arch/arm/mach-omap2/Makefile                       |    3 +-
 arch/arm/mach-omap2/am35xx-emac.c                  |    2 +-
 arch/arm/mach-omap2/board-2430sdp.c                |    2 +-
 arch/arm/mach-omap2/board-3430sdp.c                |    5 +-
 arch/arm/mach-omap2/board-3630sdp.c                |    2 +-
 arch/arm/mach-omap2/board-4430sdp.c                |    2 +-
 arch/arm/mach-omap2/board-apollon.c                |    4 +-
 arch/arm/mach-omap2/board-cm-t35.c                 |    5 +-
 arch/arm/mach-omap2/board-cm-t3517.c               |    5 +-
 arch/arm/mach-omap2/board-devkit8000.c             |   10 +-
 arch/arm/mach-omap2/board-flash.c                  |   52 +-
 arch/arm/mach-omap2/board-flash.h                  |    8 +-
 arch/arm/mach-omap2/board-h4.c                     |    4 +-
 arch/arm/mach-omap2/board-igep0020.c               |    5 +-
 arch/arm/mach-omap2/board-ldp.c                    |    8 +-
 arch/arm/mach-omap2/board-n8x0.c                   |    3 +-
 arch/arm/mach-omap2/board-omap3beagle.c            |   13 +-
 arch/arm/mach-omap2/board-omap3evm.c               |    9 +-
 arch/arm/mach-omap2/board-omap3logic.c             |    5 +-
 arch/arm/mach-omap2/board-omap3pandora.c           |    3 +-
 arch/arm/mach-omap2/board-omap3stalker.c           |    2 +-
 arch/arm/mach-omap2/board-omap3touchbook.c         |   10 +-
 arch/arm/mach-omap2/board-omap4panda.c             |    2 +-
 arch/arm/mach-omap2/board-overo.c                  |    9 +-
 arch/arm/mach-omap2/board-rm680.c                  |    6 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c       |    7 +-
 arch/arm/mach-omap2/board-rx51.c                   |    6 +-
 arch/arm/mach-omap2/board-zoom-debugboard.c        |    4 +-
 arch/arm/mach-omap2/board-zoom-display.c           |    3 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c       |    2 +-
 arch/arm/mach-omap2/board-zoom.c                   |    7 +-
 .../arm/mach-omap2/{include/mach => }/board-zoom.h |    0
 arch/arm/mach-omap2/clkt2xxx_apll.c                |    1 -
 arch/arm/mach-omap2/clkt2xxx_dpll.c                |    2 -
 arch/arm/mach-omap2/clkt2xxx_dpllcore.c            |    5 +-
 arch/arm/mach-omap2/clkt2xxx_osc.c                 |    2 -
 arch/arm/mach-omap2/clkt2xxx_sys.c                 |    2 -
 arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c       |    5 +-
 arch/arm/mach-omap2/clkt34xx_dpll3m2.c             |    4 +-
 arch/arm/mach-omap2/clkt_clksel.c                  |    2 -
 arch/arm/mach-omap2/clkt_dpll.c                    |    2 -
 arch/arm/mach-omap2/clkt_iclk.c                    |    1 -
 arch/arm/mach-omap2/clock.c                        |  518 ++++++++++++++++++-
 arch/arm/mach-omap2/clock.h                        |  317 +++++++++++-
 arch/arm/mach-omap2/clock2420_data.c               |    4 -
 arch/arm/mach-omap2/clock2430.c                    |    2 -
 arch/arm/mach-omap2/clock2430_data.c               |    4 -
 arch/arm/mach-omap2/clock2xxx.c                    |    2 -
 arch/arm/mach-omap2/clock33xx_data.c               |    5 +-
 arch/arm/mach-omap2/clock34xx.c                    |    2 -
 arch/arm/mach-omap2/clock3517.c                    |    2 -
 arch/arm/mach-omap2/clock36xx.c                    |    2 -
 arch/arm/mach-omap2/clock3xxx.c                    |    2 -
 arch/arm/mach-omap2/clock3xxx_data.c               |    4 -
 arch/arm/mach-omap2/clock44xx_data.c               |    4 -
 arch/arm/mach-omap2/clockdomain.c                  |    3 +-
 arch/arm/mach-omap2/clockdomain.h                  |    5 +-
 arch/arm/mach-omap2/clockdomain2xxx_3xxx.c         |    2 +
 arch/arm/mach-omap2/clockdomains2420_data.c        |    1 +
 arch/arm/mach-omap2/clockdomains2430_data.c        |    1 +
 arch/arm/mach-omap2/clockdomains3xxx_data.c        |    1 +
 arch/arm/mach-omap2/cm33xx.c                       |    2 +-
 arch/arm/mach-omap2/common-board-devices.c         |   46 --
 arch/arm/mach-omap2/common-board-devices.h         |    1 -
 arch/arm/mach-omap2/common.c                       |   22 +-
 arch/arm/mach-omap2/common.h                       |    9 +-
 arch/arm/mach-omap2/control.c                      |    4 +-
 arch/arm/mach-omap2/devices.c                      |    8 +-
 arch/arm/mach-omap2/display.c                      |   45 +-
 arch/arm/mach-omap2/dma.c                          |    8 +-
 arch/arm/mach-omap2/dma.h                          |  131 +++++
 arch/arm/mach-omap2/dpll3xxx.c                     |    2 -
 arch/arm/mach-omap2/dpll44xx.c                     |    2 -
 arch/arm/mach-omap2/drm.c                          |    4 +-
 arch/arm/mach-omap2/dsp.c                          |    2 +-
 arch/arm/mach-omap2/gpio.c                         |    6 +-
 arch/arm/mach-omap2/gpmc-nand.c                    |   85 +--
 arch/arm/mach-omap2/gpmc-nand.h                    |   27 +
 arch/arm/mach-omap2/gpmc-onenand.c                 |  214 ++++----
 arch/arm/mach-omap2/gpmc-onenand.h                 |   24 +
 arch/arm/mach-omap2/gpmc-smc91x.c                  |    2 +-
 arch/arm/mach-omap2/gpmc-smsc911x.c                |    2 +-
 arch/arm/mach-omap2/gpmc.c                         |  464 +----------------
 .../{plat-omap/include/plat => mach-omap2}/gpmc.h  |   61 +--
 arch/arm/mach-omap2/hdq1w.c                        |    4 +-
 arch/arm/mach-omap2/hdq1w.h                        |    2 +-
 arch/arm/mach-omap2/hsmmc.c                        |    7 +-
 arch/arm/mach-omap2/hwspinlock.c                   |    4 +-
 arch/arm/mach-omap2/i2c.c                          |   53 +-
 .../{plat-omap/include/plat => mach-omap2}/i2c.h   |   25 +-
 arch/arm/mach-omap2/io.c                           |   12 +-
 arch/arm/mach-omap2/mcbsp.c                        |    7 +-
 arch/arm/mach-omap2/mmc.h                          |   23 +
 arch/arm/mach-omap2/msdi.c                         |    7 +-
 arch/arm/mach-omap2/mux.c                          |    3 +-
 arch/arm/mach-omap2/omap-mpuss-lowpower.c          |    1 +
 .../include/plat => mach-omap2}/omap-pm.h          |    0
 arch/arm/mach-omap2/omap-secure.c                  |    1 -
 arch/arm/mach-omap2/omap-secure.h                  |    7 +
 arch/arm/mach-omap2/omap4-common.c                 |    7 +-
 arch/arm/{plat-omap => mach-omap2}/omap_device.c   |    5 +-
 .../include/plat => mach-omap2}/omap_device.h      |    2 +-
 arch/arm/mach-omap2/omap_hwmod.c                   |    4 +-
 .../include/plat => mach-omap2}/omap_hwmod.h       |    1 -
 arch/arm/mach-omap2/omap_hwmod_2420_data.c         |   12 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c         |   12 +-
 .../omap_hwmod_2xxx_3xxx_interconnect_data.c       |    3 +-
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   10 +-
 .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c |    3 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |    5 +-
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c         |   10 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   13 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |   13 +-
 arch/arm/mach-omap2/omap_hwmod_common_data.c       |    2 +-
 arch/arm/mach-omap2/omap_hwmod_common_data.h       |    2 +-
 arch/arm/mach-omap2/omap_opp_data.h                |    2 +-
 arch/arm/mach-omap2/omap_twl.c                     |    1 +
 arch/arm/mach-omap2/opp.c                          |    2 +-
 arch/arm/mach-omap2/opp3xxx_data.c                 |    1 +
 arch/arm/mach-omap2/pm-debug.c                     |    5 +-
 arch/arm/mach-omap2/pm.c                           |    5 +-
 arch/arm/mach-omap2/pm24xx.c                       |    8 +-
 arch/arm/mach-omap2/pm34xx.c                       |    9 +-
 arch/arm/mach-omap2/pm44xx.c                       |    1 +
 arch/arm/mach-omap2/pmu.c                          |    5 +-
 arch/arm/mach-omap2/powerdomain.h                  |    2 -
 arch/arm/mach-omap2/powerdomains2xxx_data.c        |    1 +
 arch/arm/mach-omap2/prcm.c                         |    1 +
 arch/arm/mach-omap2/prm33xx.c                      |    2 +-
 arch/arm/mach-omap2/prm_common.c                   |    2 +-
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |    2 +-
 arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h  |    2 +-
 arch/arm/mach-omap2/sdram-nokia.c                  |    4 +-
 arch/arm/mach-omap2/sdram-numonyx-m65kxxxxam.h     |    2 +-
 .../mach-omap2/sdram-qimonda-hyb18m512160af-6.h    |    2 +-
 arch/arm/mach-omap2/sdrc.c                         |   23 +-
 arch/arm/mach-omap2/sdrc.h                         |  146 +++++-
 arch/arm/mach-omap2/sdrc2xxx.c                     |    4 +-
 arch/arm/mach-omap2/serial.c                       |   11 +-
 arch/arm/mach-omap2/sleep34xx.S                    |    2 +-
 arch/arm/mach-omap2/soc.h                          |  468 ++++++++++++++++-
 arch/arm/mach-omap2/sr_device.c                    |    4 +-
 arch/arm/mach-omap2/timer.c                        |    6 +-
 arch/arm/mach-omap2/twl-common.c                   |    1 -
 arch/arm/mach-omap2/usb-host.c                     |    3 +-
 arch/arm/mach-omap2/usb-musb.c                     |    5 +-
 arch/arm/mach-omap2/usb-tusb6010.c                 |    2 +-
 arch/arm/mach-omap2/wd_timer.c                     |    2 +-
 arch/arm/mach-omap2/wd_timer.h                     |    2 +-
 arch/arm/plat-omap/Makefile                        |    3 +-
 arch/arm/plat-omap/clock.c                         |  544 --------------------
 arch/arm/plat-omap/common.c                        |   25 +-
 arch/arm/plat-omap/{include/plat => }/common.h     |   10 +-
 arch/arm/plat-omap/counter_32k.c                   |    3 +-
 arch/arm/plat-omap/debug-leds.c                    |    2 +-
 arch/arm/plat-omap/dma.c                           |   30 +-
 arch/arm/plat-omap/dmtimer.c                       |    3 +-
 arch/arm/plat-omap/fb.c                            |   61 +++
 arch/arm/plat-omap/fpga.h                          |   74 +++
 arch/arm/plat-omap/i2c.c                           |  133 +----
 arch/arm/plat-omap/i2c.h                           |   47 ++
 .../include/{plat/dma.h => plat-omap/dma-omap.h}   |  181 +------
 arch/arm/plat-omap/include/plat/clkdev_omap.h      |   51 --
 arch/arm/plat-omap/include/plat/clock.h            |  309 -----------
 arch/arm/plat-omap/include/plat/cpu.h              |  468 +----------------
 arch/arm/plat-omap/include/plat/dma-44xx.h         |  147 ------
 arch/arm/plat-omap/include/plat/fpga.h             |  193 -------
 arch/arm/plat-omap/include/plat/multi.h            |  120 -----
 arch/arm/plat-omap/include/plat/omap-secure.h      |   14 -
 arch/arm/plat-omap/include/plat/sdrc.h             |  164 ------
 arch/arm/plat-omap/include/plat/sram.h             |  105 ----
 arch/arm/plat-omap/omap-pm-noop.c                  |    5 +-
 arch/arm/plat-omap/sram.c                          |    4 +-
 arch/arm/plat-omap/sram.h                          |  109 +++-
 drivers/char/hw_random/omap-rng.c                  |    2 -
 drivers/crypto/omap-aes.c                          |    8 +-
 drivers/crypto/omap-sham.c                         |   10 +-
 drivers/dma/omap-dma.c                             |   11 +-
 drivers/media/platform/omap/omap_vout.c            |    4 +-
 drivers/media/platform/omap/omap_vout_vrfb.c       |    6 +-
 drivers/media/platform/omap/omap_voutdef.h         |    2 +-
 drivers/media/platform/omap3isp/isphist.c          |    2 +
 drivers/media/platform/omap3isp/ispstat.h          |    2 +-
 drivers/media/platform/soc_camera/omap1_camera.c   |    3 +-
 drivers/media/rc/ir-rx51.c                         |    1 -
 drivers/mmc/host/omap.c                            |   35 +-
 drivers/mmc/host/omap_hsmmc.c                      |    4 +-
 drivers/mtd/nand/omap2.c                           |  129 ++++-
 drivers/mtd/onenand/omap2.c                        |   11 +-
 drivers/pcmcia/omap_cf.c                           |    2 +-
 .../tidspbridge/include/dspbridge/host_os.h        |    1 -
 drivers/usb/gadget/omap_udc.c                      |    4 +-
 drivers/usb/host/ohci-omap.c                       |    5 +-
 drivers/usb/musb/tusb6010_omap.c                   |    9 +-
 drivers/video/omap/lcd_inn1510.c                   |    7 +-
 drivers/video/omap/lcdc.c                          |    2 +-
 drivers/video/omap/omapfb_main.c                   |    2 +-
 drivers/video/omap/sossi.c                         |    2 +-
 drivers/video/omap2/dss/core.c                     |    2 +-
 drivers/video/omap2/dss/dispc.c                    |   43 +-
 drivers/video/omap2/dss/dss.c                      |   39 +-
 drivers/video/omap2/dss/dss_features.c             |   64 ++-
 drivers/video/omap2/dss/dss_features.h             |    5 +-
 drivers/video/omap2/dss/hdmi.c                     |    3 +-
 drivers/video/omap2/omapfb/omapfb-ioctl.c          |    2 +-
 drivers/video/omap2/omapfb/omapfb-main.c           |    8 +-
 drivers/video/omap2/omapfb/omapfb-sysfs.c          |    2 +-
 drivers/video/omap2/vrfb.c                         |  142 ++++-
 .../linux/platform_data/leds-omap.h                |    2 -
 .../linux/platform_data/mmc-omap.h                 |   48 +-
 include/linux/platform_data/mtd-nand-omap2.h       |   46 +-
 include/linux/platform_data/mtd-onenand-omap2.h    |   28 +-
 include/video/omapdss.h                            |   14 +
 .../plat/vrfb.h => include/video/omapvrfb.h        |    2 +
 sound/soc/omap/omap-abe-twl6040.c                  |    2 +-
 sound/soc/omap/omap-mcpdm.c                        |    9 +-
 sound/soc/omap/omap-pcm.c                          |    9 +-
 260 files changed, 4351 insertions(+), 3860 deletions(-)
 create mode 100644 arch/arm/mach-omap1/dma.h
 rename arch/arm/{plat-omap/include/plat => mach-omap1/include/mach}/tc.h (100%)
 create mode 100644 arch/arm/mach-omap1/mmc.h
 create mode 100644 arch/arm/mach-omap1/soc.h
 rename arch/arm/mach-omap2/{include/mach => }/board-zoom.h (100%)
 create mode 100644 arch/arm/mach-omap2/dma.h
 create mode 100644 arch/arm/mach-omap2/gpmc-nand.h
 create mode 100644 arch/arm/mach-omap2/gpmc-onenand.h
 rename arch/arm/{plat-omap/include/plat => mach-omap2}/gpmc.h (67%)
 rename arch/arm/{plat-omap/include/plat => mach-omap2}/i2c.h (66%)
 create mode 100644 arch/arm/mach-omap2/mmc.h
 rename arch/arm/{plat-omap/include/plat => mach-omap2}/omap-pm.h (100%)
 rename arch/arm/{plat-omap => mach-omap2}/omap_device.c (99%)
 rename arch/arm/{plat-omap/include/plat => mach-omap2}/omap_device.h (99%)
 rename arch/arm/{plat-omap/include/plat => mach-omap2}/omap_hwmod.h (99%)
 delete mode 100644 arch/arm/plat-omap/clock.c
 rename arch/arm/plat-omap/{include/plat => }/common.h (89%)
 create mode 100644 arch/arm/plat-omap/fpga.h
 create mode 100644 arch/arm/plat-omap/i2c.h
 rename arch/arm/plat-omap/include/{plat/dma.h => plat-omap/dma-omap.h} (61%)
 delete mode 100644 arch/arm/plat-omap/include/plat/clkdev_omap.h
 delete mode 100644 arch/arm/plat-omap/include/plat/clock.h
 delete mode 100644 arch/arm/plat-omap/include/plat/dma-44xx.h
 delete mode 100644 arch/arm/plat-omap/include/plat/fpga.h
 delete mode 100644 arch/arm/plat-omap/include/plat/multi.h
 delete mode 100644 arch/arm/plat-omap/include/plat/omap-secure.h
 delete mode 100644 arch/arm/plat-omap/include/plat/sdrc.h
 delete mode 100644 arch/arm/plat-omap/include/plat/sram.h
 rename arch/arm/plat-omap/include/plat/led.h => include/linux/platform_data/leds-omap.h (91%)
 rename arch/arm/plat-omap/include/plat/mmc.h => include/linux/platform_data/mmc-omap.h (80%)
 rename arch/arm/plat-omap/include/plat/vrfb.h => include/video/omapvrfb.h (95%)

^ permalink raw reply

* [PATCH 01/10] pinctrl: use postcore_initcall
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-19  2:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350551224-12857-1-git-send-email-haojian.zhuang@gmail.com>

On 17:06 Thu 18 Oct     , Haojian Zhuang wrote:
> Since pins are configured in device driver, pinctrl driver should be
> loaded by those device driver. module_platform_driver() only declares
> pinctrl driver is in module_initcall privilege. Use postcore_initcall
> privilege instead.
this  should not be mandatory as you can use defer probe

Best Regards,
J.

^ permalink raw reply

* [PATCH 08/10] pinctrl: single: support pinconf generic
From: Haojian Zhuang @ 2012-10-19  2:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121018222907.GH30550@atomide.com>

On Fri, Oct 19, 2012 at 6:29 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Linus Walleij <linus.walleij@linaro.org> [121018 11:32]:
>> On Thu, Oct 18, 2012 at 11:07 AM, Haojian Zhuang
>> <haojian.zhuang@gmail.com> wrote:
>>
>> > Add pinconf generic support with POWER SOURCE, BIAS PULL.
>> >
>> > Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
>>
>> I really like the looks of this, good job Haojian!
>>
>> Now we just need to hear what Tony says about it...
>
> Hey that's cool, maybe I'll find some use for those too :)
> I'll take a closer look tonigh or on Friday.
>
> Regards,
>
> Tony

I wonder whether gpio function in OMAP is also configured in the pinmux
register. For example, the function is 3bit field in pinmux register
of Marvell's
PXA/MMP silicon. GPIO function is the one of function.

If the usage case is same in OMAP silicon, I can merge
"pinctrl-single,gpio-mask"
with "pinctrl-single,function-mask".

Do we need "pinctrl-single,gpio-disable" at here? I want to remove it,
but I don't
know whether it's necessary in OMAP case.

Regards
Haojian

^ permalink raw reply

* [PATCH 2/2] ARM: OMAP: move OMAP USB platform data to <linux/platform_data/omap-usb.h>
From: Tony Lindgren @ 2012-10-19  2:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121019021816.6693.65985.stgit@muffinssi.local>

From: Felipe Balbi <balbi@ti.com>

In order to make single zImage work for ARM architecture,
we need to make sure we don't depend on private headers.

Move USB platform_data to <linux/platform_data/omap-usb.h>
and add a minimal drivers/mfd/usb-omap.h.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Partha Basak <parthab@india.ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
[tony at atomide.com: updated for local mfd/usb-omap.h]
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-4430sdp.c    |    1 +
 arch/arm/mach-omap2/board-am3517evm.c  |    1 +
 arch/arm/mach-omap2/board-omap3evm.c   |    1 +
 arch/arm/mach-omap2/board-omap4panda.c |    1 +
 arch/arm/mach-omap2/board-rx51.c       |    1 +
 arch/arm/mach-omap2/board-ti8168evm.c  |    2 +
 arch/arm/mach-omap2/usb-tusb6010.c     |    1 +
 arch/arm/mach-omap2/usb.h              |    2 +
 drivers/mfd/omap-usb-host.c            |    5 +++
 drivers/mfd/omap-usb-tll.c             |    2 +
 drivers/mfd/omap-usb.h                 |    2 +
 drivers/usb/host/ehci-omap.c           |    3 +-
 drivers/usb/host/ohci-omap3.c          |    1 -
 drivers/usb/musb/am35x.c               |    3 +-
 drivers/usb/musb/musb_dsps.c           |    3 +-
 drivers/usb/musb/omap2430.h            |    2 +
 include/linux/platform_data/usb-omap.h |   47 ++++++++++++++++++--------------
 17 files changed, 48 insertions(+), 30 deletions(-)
 create mode 100644 drivers/mfd/omap-usb.h
 rename arch/arm/plat-omap/include/plat/usb.h => include/linux/platform_data/usb-omap.h (56%)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 5700fc5..52534ba 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -27,6 +27,7 @@
 #include <linux/leds.h>
 #include <linux/leds_pwm.h>
 #include <linux/platform_data/omap4-keypad.h>
+#include <linux/usb/musb.h>
 
 #include <asm/hardware/gic.h>
 #include <asm/mach-types.h>
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 0dbeb77..96d6c5a 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -25,6 +25,7 @@
 #include <linux/can/platform/ti_hecc.h>
 #include <linux/davinci_emac.h>
 #include <linux/mmc/host.h>
+#include <linux/usb/musb.h>
 #include <linux/platform_data/gpio-omap.h>
 
 #include "am35xx.h"
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 6e7e69b..a22a5b6 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -32,6 +32,7 @@
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl.h>
 #include <linux/usb/otg.h>
+#include <linux/usb/musb.h>
 #include <linux/usb/nop-usb-xceiv.h>
 #include <linux/smsc911x.h>
 
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 74e39bb..3f0b92a 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -29,6 +29,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
 #include <linux/ti_wilink_st.h>
+#include <linux/usb/musb.h>
 #include <linux/wl12xx.h>
 #include <linux/platform_data/omap-abe-twl6040.h>
 
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 8c4d27e..c2f8f6c 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
+#include <linux/usb/musb.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include <asm/mach-types.h>
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index 4977c77..5e672c2 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -14,6 +14,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/usb/musb.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 805bea6..5e24289 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/export.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include <linux/usb/musb.h>
 
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h
index b2c4ff1..9b986ea 100644
--- a/arch/arm/mach-omap2/usb.h
+++ b/arch/arm/mach-omap2/usb.h
@@ -1,4 +1,4 @@
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 /* AM35x */
 /* USB 2.0 PHY Control */
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 23cec57..cebfe0a 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -26,9 +26,12 @@
 #include <linux/spinlock.h>
 #include <linux/gpio.h>
 #include <plat/cpu.h>
-#include <plat/usb.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/usb-omap.h>
 #include <linux/pm_runtime.h>
 
+#include "omap-usb.h"
+
 #define USBHS_DRIVER_NAME	"usbhs_omap"
 #define OMAP_EHCI_DEVICE	"ehci-omap"
 #define OMAP_OHCI_DEVICE	"ohci-omap3"
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 4b7757b..0db0dfa 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -25,8 +25,8 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/err.h>
-#include <plat/usb.h>
 #include <linux/pm_runtime.h>
+#include <linux/platform_data/usb-omap.h>
 
 #define USBTLL_DRIVER_NAME	"usbhs_tll"
 
diff --git a/drivers/mfd/omap-usb.h b/drivers/mfd/omap-usb.h
new file mode 100644
index 0000000..972aa96
--- /dev/null
+++ b/drivers/mfd/omap-usb.h
@@ -0,0 +1,2 @@
+extern int omap_tll_enable(void);
+extern int omap_tll_disable(void);
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index d7fe287..0d5ac36 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -39,12 +39,13 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/usb/ulpi.h>
-#include <plat/usb.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 #include <linux/gpio.h>
 #include <linux/clk.h>
 
+#include <linux/platform_data/usb-omap.h>
+
 /* EHCI Register Set */
 #define EHCI_INSNREG04					(0xA0)
 #define EHCI_INSNREG04_DISABLE_UNSUSPEND		(1 << 5)
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c
index 1b8133b..bd7803d 100644
--- a/drivers/usb/host/ohci-omap3.c
+++ b/drivers/usb/host/ohci-omap3.c
@@ -30,7 +30,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <plat/usb.h>
 #include <linux/pm_runtime.h>
 
 /*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 457f25e..0605fe3 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -34,8 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/usb/nop-usb-xceiv.h>
-
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include "musb_core.h"
 
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 444346e..a67af21 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -38,13 +38,12 @@
 #include <linux/pm_runtime.h>
 #include <linux/module.h>
 #include <linux/usb/nop-usb-xceiv.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_address.h>
 
-#include <plat/usb.h>
-
 #include "musb_core.h"
 
 #ifdef CONFIG_OF
diff --git a/drivers/usb/musb/omap2430.h b/drivers/usb/musb/omap2430.h
index b85f397..8ef6566 100644
--- a/drivers/usb/musb/omap2430.h
+++ b/drivers/usb/musb/omap2430.h
@@ -10,7 +10,7 @@
 #ifndef __MUSB_OMAP243X_H__
 #define __MUSB_OMAP243X_H__
 
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 /*
  * OMAP2430-specific definitions
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/include/linux/platform_data/usb-omap.h
similarity index 56%
rename from arch/arm/plat-omap/include/plat/usb.h
rename to include/linux/platform_data/usb-omap.h
index 1dd6522..8570bcf 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/include/linux/platform_data/usb-omap.h
@@ -1,11 +1,23 @@
-// include/asm-arm/mach-omap/usb.h
-
-#ifndef	__ASM_ARCH_OMAP_USB_H
-#define	__ASM_ARCH_OMAP_USB_H
-
-#include <linux/io.h>
-#include <linux/platform_device.h>
-#include <linux/usb/musb.h>
+/*
+ * usb-omap.h - Platform data for the various OMAP USB IPs
+ *
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * License ("GPL") version 2, as published by the Free Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #define OMAP3_HS_USB_PORTS	3
 
@@ -26,7 +38,9 @@ enum usbhs_omap_port_mode {
 	OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
 };
 
-#ifdef CONFIG_ARCH_OMAP2PLUS
+struct usbtll_omap_platform_data {
+	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
+};
 
 struct ehci_hcd_omap_platform_data {
 	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
@@ -47,9 +61,6 @@ struct usbhs_omap_platform_data {
 	struct ohci_hcd_omap_platform_data	*ohci_data;
 };
 
-struct usbtll_omap_platform_data {
-	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
-};
 /*-------------------------------------------------------------------------*/
 
 struct omap_musb_board_data {
@@ -63,11 +74,7 @@ struct omap_musb_board_data {
 	void	(*reset)(void);
 };
 
-enum musb_interface    {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
-
-extern int omap_tll_enable(void);
-extern int omap_tll_disable(void);
-
-#endif
-
-#endif	/* __ASM_ARCH_OMAP_USB_H */
+enum musb_interface {
+	MUSB_INTERFACE_ULPI,
+	MUSB_INTERFACE_UTMI
+};

^ permalink raw reply related

* [PATCH 1/2] ARM: OMAP2+: Introduce local usb.h
From: Tony Lindgren @ 2012-10-19  2:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121019021816.6693.65985.stgit@muffinssi.local>

Let's move what we can from plat/usb.h to the local usb.h
for ARM common zImage support.

This is needed so we can remove plat/usb.h for ARM common
zImage support.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Partha Basak <parthab@india.ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: linux-usb at vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/clock.c                  |    1 
 arch/arm/mach-omap2/board-2430sdp.c          |    1 
 arch/arm/mach-omap2/board-3430sdp.c          |    1 
 arch/arm/mach-omap2/board-3630sdp.c          |    1 
 arch/arm/mach-omap2/board-4430sdp.c          |    1 
 arch/arm/mach-omap2/board-am3517crane.c      |    1 
 arch/arm/mach-omap2/board-am3517evm.c        |    1 
 arch/arm/mach-omap2/board-cm-t35.c           |    1 
 arch/arm/mach-omap2/board-cm-t3517.c         |    1 
 arch/arm/mach-omap2/board-devkit8000.c       |    1 
 arch/arm/mach-omap2/board-igep0020.c         |    1 
 arch/arm/mach-omap2/board-ldp.c              |    1 
 arch/arm/mach-omap2/board-omap3beagle.c      |    1 
 arch/arm/mach-omap2/board-omap3evm.c         |    1 
 arch/arm/mach-omap2/board-omap3logic.c       |    1 
 arch/arm/mach-omap2/board-omap3pandora.c     |    1 
 arch/arm/mach-omap2/board-omap3stalker.c     |    1 
 arch/arm/mach-omap2/board-omap3touchbook.c   |    1 
 arch/arm/mach-omap2/board-omap4panda.c       |    1 
 arch/arm/mach-omap2/board-overo.c            |    1 
 arch/arm/mach-omap2/board-rm680.c            |    1 
 arch/arm/mach-omap2/board-rx51.c             |    1 
 arch/arm/mach-omap2/board-ti8168evm.c        |    1 
 arch/arm/mach-omap2/board-zoom-peripherals.c |    1 
 arch/arm/mach-omap2/board-zoom.c             |    1 
 arch/arm/mach-omap2/common.h                 |    2 
 arch/arm/mach-omap2/omap_phy_internal.c      |    4 -
 arch/arm/mach-omap2/twl-common.c             |    1 
 arch/arm/mach-omap2/usb-host.c               |    2 
 arch/arm/mach-omap2/usb-musb.c               |    2 
 arch/arm/mach-omap2/usb.h                    |   82 ++++++++++++++++++++
 arch/arm/plat-omap/include/plat/usb.h        |  106 --------------------------
 32 files changed, 88 insertions(+), 136 deletions(-)
 create mode 100644 arch/arm/mach-omap2/usb.h

diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 638f407..1e49eda 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -22,7 +22,6 @@
 #include <asm/mach-types.h>
 
 #include <plat/cpu.h>
-#include <plat/usb.h>
 #include <plat/clock.h>
 #include <plat/sram.h>
 #include <plat/clkdev_omap.h>
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 95b384d..df561ad 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -35,7 +35,6 @@
 
 #include "common.h"
 #include <plat/gpmc.h>
-#include <plat/usb.h>
 #include "gpmc-smc91x.h"
 
 #include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 96cd369..14c07ee 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -30,7 +30,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/usb.h>
 #include "common.h"
 #include <plat/dma.h>
 #include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index fc224ad..f8e6288 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -18,7 +18,6 @@
 
 #include "common.h"
 #include "gpmc-smc91x.h"
-#include <plat/usb.h>
 
 #include <mach/board-zoom.h>
 
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..5700fc5 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -34,7 +34,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <plat/mmc.h>
 #include "omap4-keypad.h"
 #include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 318fead..603503c 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include "am35xx-emac.h"
 #include "mux.h"
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index e162897..0dbeb77 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -33,7 +33,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 376d26e..435c7be 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -41,7 +41,6 @@
 #include "common.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/gpmc.h>
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 59c0a45..db1e14c 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -39,7 +39,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/gpmc.h>
 
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 1fd161e..8df2720 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -41,7 +41,6 @@
 #include "common.h"
 #include <plat/gpmc.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 48d5e41..62da89f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -31,7 +31,6 @@
 
 #include "common.h"
 #include <plat/gpmc.h>
-#include <plat/usb.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ee8c3cf..8d9406b 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -37,7 +37,6 @@
 #include "common.h"
 #include <plat/gpmc.h>
 #include <mach/board-zoom.h>
-#include <plat/usb.h>
 #include "gpmc-smsc911x.h"
 
 #include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 388c431..33a5f58 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -43,7 +43,6 @@
 #include <video/omap-panel-tfp410.h>
 #include <plat/gpmc.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 #include <plat/omap_device.h>
 
 #include "mux.h"
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..6e7e69b 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -45,7 +45,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/usb.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include "common.h"
 #include <linux/platform_data/spi-omap2-mcspi.h>
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 7bd8253..a0d8fe1 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -37,7 +37,6 @@
 #include "gpmc-smsc911x.h"
 #include <plat/gpmc.h>
 #include <plat/sdrc.h>
-#include <plat/usb.h>
 
 #include "common.h"
 #include "mux.h"
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..f2be51b 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -42,7 +42,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 731235e..4343fb6 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -42,7 +42,6 @@
 #include "common.h"
 #include <plat/gpmc.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 944ffc4..c26c958 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -46,7 +46,6 @@
 #include "common.h"
 #include <plat/gpmc.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 
 #include "mux.h"
 #include "hsmmc.h"
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..74e39bb 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -39,7 +39,6 @@
 #include <video/omapdss.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <plat/mmc.h>
 #include <video/omap-panel-tfp410.h>
 
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index b700685..0eed6da 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -50,7 +50,6 @@
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
 #include <plat/gpmc.h>
-#include <plat/usb.h>
 
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 45997bf..d55a983 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -24,7 +24,6 @@
 
 #include <plat/i2c.h>
 #include <plat/mmc.h>
-#include <plat/usb.h>
 #include <plat/gpmc.h>
 #include "common.h"
 #include <plat/serial.h>
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 7bbb05d..8c4d27e 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -26,7 +26,6 @@
 #include "common.h"
 #include <plat/dma.h>
 #include <plat/gpmc.h>
-#include <plat/usb.h>
 
 #include "mux.h"
 #include "pm.h"
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index c4f8833..4977c77 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -20,7 +20,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 static struct omap_musb_board_data musb_board_data = {
 	.set_phy_power	= ti81xx_musb_phy_power,
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..ce923b7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include <mach/board-zoom.h>
 
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 4994438..6e1afae 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -22,7 +22,6 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include <mach/board-zoom.h>
 
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 7045e4d..fa2f4c9 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -36,6 +36,8 @@
 #include <plat/serial.h>
 #include <plat/common.h>
 
+#include "usb.h"
+
 #define OMAP_INTC_START		NR_IRQS
 
 #ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index d992db8..4d76a3c 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -27,11 +27,11 @@
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/usb.h>
-
-#include <plat/usb.h>
+#include <linux/usb/musb.h>
 
 #include "soc.h"
 #include "control.h"
+#include "usb.h"
 
 void am35x_musb_reset(void)
 {
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 635e109..1131d47 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -27,7 +27,6 @@
 #include <linux/regulator/fixed.h>
 
 #include <plat/i2c.h>
-#include <plat/usb.h>
 
 #include "soc.h"
 #include "twl-common.h"
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 3c43449..b1cf8c8 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -25,10 +25,10 @@
 
 #include <asm/io.h>
 
-#include <plat/usb.h>
 #include <plat/omap_device.h>
 
 #include "mux.h"
+#include "usb.h"
 
 #ifdef CONFIG_MFD_OMAP_USB_HOST
 
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 51da21c..faf473f 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -25,12 +25,12 @@
 #include <linux/io.h>
 #include <linux/usb/musb.h>
 
-#include <plat/usb.h>
 #include <plat/omap_device.h>
 
 #include "am35xx.h"
 
 #include "mux.h"
+#include "usb.h"
 
 static struct musb_hdrc_config musb_config = {
 	.multipoint	= 1,
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h
new file mode 100644
index 0000000..b2c4ff1
--- /dev/null
+++ b/arch/arm/mach-omap2/usb.h
@@ -0,0 +1,82 @@
+#include <plat/usb.h>
+
+/* AM35x */
+/* USB 2.0 PHY Control */
+#define CONF2_PHY_GPIOMODE	(1 << 23)
+#define CONF2_OTGMODE		(3 << 14)
+#define CONF2_NO_OVERRIDE	(0 << 14)
+#define CONF2_FORCE_HOST	(1 << 14)
+#define CONF2_FORCE_DEVICE	(2 << 14)
+#define CONF2_FORCE_HOST_VBUS_LOW (3 << 14)
+#define CONF2_SESENDEN		(1 << 13)
+#define CONF2_VBDTCTEN		(1 << 12)
+#define CONF2_REFFREQ_24MHZ	(2 << 8)
+#define CONF2_REFFREQ_26MHZ	(7 << 8)
+#define CONF2_REFFREQ_13MHZ	(6 << 8)
+#define CONF2_REFFREQ		(0xf << 8)
+#define CONF2_PHYCLKGD		(1 << 7)
+#define CONF2_VBUSSENSE		(1 << 6)
+#define CONF2_PHY_PLLON		(1 << 5)
+#define CONF2_RESET		(1 << 4)
+#define CONF2_PHYPWRDN		(1 << 3)
+#define CONF2_OTGPWRDN		(1 << 2)
+#define CONF2_DATPOL		(1 << 1)
+
+/* TI81XX specific definitions */
+#define USBCTRL0	0x620
+#define USBSTAT0	0x624
+
+/* TI816X PHY controls bits */
+#define TI816X_USBPHY0_NORMAL_MODE	(1 << 0)
+#define TI816X_USBPHY_REFCLK_OSC	(1 << 8)
+
+/* TI814X PHY controls bits */
+#define USBPHY_CM_PWRDN		(1 << 0)
+#define USBPHY_OTG_PWRDN	(1 << 1)
+#define USBPHY_CHGDET_DIS	(1 << 2)
+#define USBPHY_CHGDET_RSTRT	(1 << 3)
+#define USBPHY_SRCONDM		(1 << 4)
+#define USBPHY_SINKONDP		(1 << 5)
+#define USBPHY_CHGISINK_EN	(1 << 6)
+#define USBPHY_CHGVSRC_EN	(1 << 7)
+#define USBPHY_DMPULLUP		(1 << 8)
+#define USBPHY_DPPULLUP		(1 << 9)
+#define USBPHY_CDET_EXTCTL	(1 << 10)
+#define USBPHY_GPIO_MODE	(1 << 12)
+#define USBPHY_DPOPBUFCTL	(1 << 13)
+#define USBPHY_DMOPBUFCTL	(1 << 14)
+#define USBPHY_DPINPUT		(1 << 15)
+#define USBPHY_DMINPUT		(1 << 16)
+#define USBPHY_DPGPIO_PD	(1 << 17)
+#define USBPHY_DMGPIO_PD	(1 << 18)
+#define USBPHY_OTGVDET_EN	(1 << 19)
+#define USBPHY_OTGSESSEND_EN	(1 << 20)
+#define USBPHY_DATA_POLARITY	(1 << 23)
+
+struct usbhs_omap_board_data {
+	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
+
+	/* have to be valid if phy_reset is true and portx is in phy mode */
+	int	reset_gpio_port[OMAP3_HS_USB_PORTS];
+
+	/* Set this to true for ES2.x silicon */
+	unsigned			es2_compatibility:1;
+
+	unsigned			phy_reset:1;
+
+	/*
+	 * Regulators for USB PHYs.
+	 * Each PHY can have a separate regulator.
+	 */
+	struct regulator		*regulator[OMAP3_HS_USB_PORTS];
+};
+
+extern void usb_musb_init(struct omap_musb_board_data *board_data);
+extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
+
+extern void am35x_musb_reset(void);
+extern void am35x_musb_phy_power(u8 on);
+extern void am35x_musb_clear_irq(void);
+extern void am35x_set_mode(u8 musb_mode);
+extern void ti81xx_musb_phy_power(u8 on);
+
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 87ee140..1dd6522 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -26,24 +26,6 @@ enum usbhs_omap_port_mode {
 	OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
 };
 
-struct usbhs_omap_board_data {
-	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
-
-	/* have to be valid if phy_reset is true and portx is in phy mode */
-	int	reset_gpio_port[OMAP3_HS_USB_PORTS];
-
-	/* Set this to true for ES2.x silicon */
-	unsigned			es2_compatibility:1;
-
-	unsigned			phy_reset:1;
-
-	/*
-	 * Regulators for USB PHYs.
-	 * Each PHY can have a separate regulator.
-	 */
-	struct regulator		*regulator[OMAP3_HS_USB_PORTS];
-};
-
 #ifdef CONFIG_ARCH_OMAP2PLUS
 
 struct ehci_hcd_omap_platform_data {
@@ -83,97 +65,9 @@ struct omap_musb_board_data {
 
 enum musb_interface    {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
 
-extern void usb_musb_init(struct omap_musb_board_data *board_data);
-
-extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
 extern int omap_tll_enable(void);
 extern int omap_tll_disable(void);
 
-extern int omap4430_phy_power(struct device *dev, int ID, int on);
-extern int omap4430_phy_set_clk(struct device *dev, int on);
-extern int omap4430_phy_init(struct device *dev);
-extern int omap4430_phy_exit(struct device *dev);
-extern int omap4430_phy_suspend(struct device *dev, int suspend);
-
-#endif
-
-extern void am35x_musb_reset(void);
-extern void am35x_musb_phy_power(u8 on);
-extern void am35x_musb_clear_irq(void);
-extern void am35x_set_mode(u8 musb_mode);
-extern void ti81xx_musb_phy_power(u8 on);
-
-/* AM35x */
-/* USB 2.0 PHY Control */
-#define CONF2_PHY_GPIOMODE	(1 << 23)
-#define CONF2_OTGMODE		(3 << 14)
-#define CONF2_NO_OVERRIDE	(0 << 14)
-#define CONF2_FORCE_HOST	(1 << 14)
-#define CONF2_FORCE_DEVICE	(2 << 14)
-#define CONF2_FORCE_HOST_VBUS_LOW (3 << 14)
-#define CONF2_SESENDEN		(1 << 13)
-#define CONF2_VBDTCTEN		(1 << 12)
-#define CONF2_REFFREQ_24MHZ	(2 << 8)
-#define CONF2_REFFREQ_26MHZ	(7 << 8)
-#define CONF2_REFFREQ_13MHZ	(6 << 8)
-#define CONF2_REFFREQ		(0xf << 8)
-#define CONF2_PHYCLKGD		(1 << 7)
-#define CONF2_VBUSSENSE		(1 << 6)
-#define CONF2_PHY_PLLON		(1 << 5)
-#define CONF2_RESET		(1 << 4)
-#define CONF2_PHYPWRDN		(1 << 3)
-#define CONF2_OTGPWRDN		(1 << 2)
-#define CONF2_DATPOL		(1 << 1)
-
-/* TI81XX specific definitions */
-#define USBCTRL0	0x620
-#define USBSTAT0	0x624
-
-/* TI816X PHY controls bits */
-#define TI816X_USBPHY0_NORMAL_MODE	(1 << 0)
-#define TI816X_USBPHY_REFCLK_OSC	(1 << 8)
-
-/* TI814X PHY controls bits */
-#define USBPHY_CM_PWRDN		(1 << 0)
-#define USBPHY_OTG_PWRDN	(1 << 1)
-#define USBPHY_CHGDET_DIS	(1 << 2)
-#define USBPHY_CHGDET_RSTRT	(1 << 3)
-#define USBPHY_SRCONDM		(1 << 4)
-#define USBPHY_SINKONDP		(1 << 5)
-#define USBPHY_CHGISINK_EN	(1 << 6)
-#define USBPHY_CHGVSRC_EN	(1 << 7)
-#define USBPHY_DMPULLUP		(1 << 8)
-#define USBPHY_DPPULLUP		(1 << 9)
-#define USBPHY_CDET_EXTCTL	(1 << 10)
-#define USBPHY_GPIO_MODE	(1 << 12)
-#define USBPHY_DPOPBUFCTL	(1 << 13)
-#define USBPHY_DMOPBUFCTL	(1 << 14)
-#define USBPHY_DPINPUT		(1 << 15)
-#define USBPHY_DMINPUT		(1 << 16)
-#define USBPHY_DPGPIO_PD	(1 << 17)
-#define USBPHY_DMGPIO_PD	(1 << 18)
-#define USBPHY_OTGVDET_EN	(1 << 19)
-#define USBPHY_OTGSESSEND_EN	(1 << 20)
-#define USBPHY_DATA_POLARITY	(1 << 23)
-
-#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB)
-u32 omap1_usb0_init(unsigned nwires, unsigned is_device);
-u32 omap1_usb1_init(unsigned nwires);
-u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup);
-#else
-static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device)
-{
-	return 0;
-}
-static inline u32 omap1_usb1_init(unsigned nwires)
-{
-	return 0;
-
-}
-static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
-{
-	return 0;
-}
 #endif
 
 #endif	/* __ASM_ARCH_OMAP_USB_H */

^ permalink raw reply related

* [PATCH 0/2] omap plat/usb.h removal for v3.8 merge window
From: Tony Lindgren @ 2012-10-19  2:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Here are two patches against v3.7-rc1 to remove
plat/usb.h.

Once people are happy with these, I'll apply these
into omap-for-v3.8/cleanup-headers-usb branch so
usb and mfd trees can also pull these in if needed.

Regards,

Tony

---

Felipe Balbi (1):
      ARM: OMAP: move OMAP USB platform data to <linux/platform_data/omap-usb.h>

Tony Lindgren (1):
      ARM: OMAP2+: Introduce local usb.h


 arch/arm/mach-omap1/clock.c                  |    1 
 arch/arm/mach-omap2/board-2430sdp.c          |    1 
 arch/arm/mach-omap2/board-3430sdp.c          |    1 
 arch/arm/mach-omap2/board-3630sdp.c          |    1 
 arch/arm/mach-omap2/board-4430sdp.c          |    2 
 arch/arm/mach-omap2/board-am3517crane.c      |    1 
 arch/arm/mach-omap2/board-am3517evm.c        |    2 
 arch/arm/mach-omap2/board-cm-t35.c           |    1 
 arch/arm/mach-omap2/board-cm-t3517.c         |    1 
 arch/arm/mach-omap2/board-devkit8000.c       |    1 
 arch/arm/mach-omap2/board-igep0020.c         |    1 
 arch/arm/mach-omap2/board-ldp.c              |    1 
 arch/arm/mach-omap2/board-omap3beagle.c      |    1 
 arch/arm/mach-omap2/board-omap3evm.c         |    2 
 arch/arm/mach-omap2/board-omap3logic.c       |    1 
 arch/arm/mach-omap2/board-omap3pandora.c     |    1 
 arch/arm/mach-omap2/board-omap3stalker.c     |    1 
 arch/arm/mach-omap2/board-omap3touchbook.c   |    1 
 arch/arm/mach-omap2/board-omap4panda.c       |    2 
 arch/arm/mach-omap2/board-overo.c            |    1 
 arch/arm/mach-omap2/board-rm680.c            |    1 
 arch/arm/mach-omap2/board-rx51.c             |    2 
 arch/arm/mach-omap2/board-ti8168evm.c        |    3 
 arch/arm/mach-omap2/board-zoom-peripherals.c |    1 
 arch/arm/mach-omap2/board-zoom.c             |    1 
 arch/arm/mach-omap2/common.h                 |    2 
 arch/arm/mach-omap2/omap_phy_internal.c      |    4 -
 arch/arm/mach-omap2/twl-common.c             |    1 
 arch/arm/mach-omap2/usb-host.c               |    2 
 arch/arm/mach-omap2/usb-musb.c               |    2 
 arch/arm/mach-omap2/usb-tusb6010.c           |    1 
 arch/arm/mach-omap2/usb.h                    |   82 ++++++++++++
 arch/arm/plat-omap/include/plat/usb.h        |  179 --------------------------
 drivers/mfd/omap-usb-host.c                  |    5 +
 drivers/mfd/omap-usb-tll.c                   |    2 
 drivers/mfd/omap-usb.h                       |    2 
 drivers/usb/host/ehci-omap.c                 |    3 
 drivers/usb/host/ohci-omap3.c                |    1 
 drivers/usb/musb/am35x.c                     |    3 
 drivers/usb/musb/musb_dsps.c                 |    3 
 drivers/usb/musb/omap2430.h                  |    2 
 include/linux/platform_data/usb-omap.h       |   80 ++++++++++++
 42 files changed, 188 insertions(+), 218 deletions(-)
 create mode 100644 arch/arm/mach-omap2/usb.h
 delete mode 100644 arch/arm/plat-omap/include/plat/usb.h
 create mode 100644 drivers/mfd/omap-usb.h
 create mode 100644 include/linux/platform_data/usb-omap.h

-- 

^ permalink raw reply

* [PATCH 1/1] arm: at91: add Ronetix pm9g45 board support
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-19  2:19 UTC (permalink / raw)
  To: linux-arm-kernel

CPU Module with ATMEL AT91SAM9G45
http://www.ronetix.at/pm9g45.html

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/boot/dts/Makefile   |    1 +
 arch/arm/boot/dts/pm9g45.dts |  144 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 145 insertions(+)
 create mode 100644 arch/arm/boot/dts/pm9g45.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a9b051a..627b6ad 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb
 dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb
 # sam9g45
 dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb
+dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb
 # sam9n12
 dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb
 # sam9x5
diff --git a/arch/arm/boot/dts/pm9g45.dts b/arch/arm/boot/dts/pm9g45.dts
new file mode 100644
index 0000000..b0c258d
--- /dev/null
+++ b/arch/arm/boot/dts/pm9g45.dts
@@ -0,0 +1,144 @@
+/*
+ * pm9g45.dts - Device Tree file for Ronetix pm9g45 board
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9g45.dtsi"
+
+/ {
+	model = "Ronetix pm9g45";
+	compatible = "ronetix,pm9g45", "atmel,at91sam9g45", "atmel,at91sam9";
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	memory {
+		reg = <0x70000000 0x8000000>;
+	};
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		main_clock: clock at 0 {
+			compatible = "atmel,osc", "fixed-clock";
+			clock-frequency = <12000000>;
+		};
+	};
+
+	ahb {
+		apb {
+			dbgu: serial at ffffee00 {
+				status = "okay";
+			};
+
+			pinctrl at fffff200 {
+
+				board {
+					pinctrl_board_nand: nand0-board {
+						atmel,pins =
+							<3 3 0x0 0x1	/* PD3 gpio RDY pin pull_up*/
+							 2 14 0x0 0x1>;	/* PC14 gpio enable pin pull_up */
+					};
+				};
+			};
+
+			macb0: ethernet at fffbc000 {
+				phy-mode = "rmii";
+				status = "okay";
+			};
+		};
+
+		nand0: nand at 40000000 {
+			nand-bus-width = <8>;
+			nand-ecc-mode = "soft";
+			nand-on-flash-bbt;
+			pinctrl-0 = <&pinctrl_board_nand>;
+
+			gpios = <&pioD 3 0
+				 &pioC 14 0
+				 0
+				>;
+
+			status = "okay";
+
+			at91bootstrap at 0 {
+				label = "at91bootstrap";
+				reg = <0x0 0x20000>;
+			};
+
+			barebox at 20000 {
+				label = "barebox";
+				reg = <0x20000 0x40000>;
+			};
+
+			bareboxenv at 60000 {
+				label = "bareboxenv";
+				reg = <0x60000 0x1A0000>;
+			};
+
+			kernel at 200000 {
+				label = "bareboxenv2";
+				reg = <0x200000 0x300000>;
+			};
+
+			kernel at 500000 {
+				label = "root";
+				reg = <0x500000 0x400000>;
+			};
+
+			data at 900000 {
+				label = "data";
+				reg = <0x900000 0x8340000>;
+			};
+		};
+
+		usb0: ohci at 00700000 {
+			status = "okay";
+			num-ports = <2>;
+		};
+
+		usb1: ehci at 00800000 {
+			status = "okay";
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led0 {
+			label = "led0";
+			gpios = <&pioD 0 1>;
+			linux,default-trigger = "nand-disk";
+		};
+
+		led1 {
+			label = "led1";
+			gpios = <&pioD 31 0>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		right {
+			label = "SW4";
+			gpios = <&pioE 7 1>;
+			linux,code = <106>;
+		};
+
+		up {
+			label = "SW3";
+			gpios = <&pioE 8 1>;
+			linux,code = <103>;
+		};
+	};
+};
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 01/10] pinctrl: use postcore_initcall
From: Haojian Zhuang @ 2012-10-19  2:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121018222802.GG30550@atomide.com>

On Fri, Oct 19, 2012 at 6:28 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Stephen Warren <swarren@wwwdotorg.org> [121018 15:20]:
>> On 10/18/2012 03:06 AM, Haojian Zhuang wrote:
>> > Since pins are configured in device driver, pinctrl driver should be
>> > loaded by those device driver. module_platform_driver() only declares
>> > pinctrl driver is in module_initcall privilege. Use postcore_initcall
>> > privilege instead.
>>
>> I'm not convinced this is needed; doesn't deferred probe sort out the
>> dependencies correctly?
>
> I'm a bit concerned about this need too as the trend is towards
> initializing things later than earlier. The drivers/Makefile order
> and deferred probe should be already enough?
>
> Specifically could you decribe the cases where this issue happens?
> Also check if one of your client drivers has some early initcall
> that's no longer needed.
>
> Regards,
>
> Tony

Yes, the special case is PMIC. Most of PMIC are based on I2C/SPI bus.
It means that I2C/SPI bus driver should be initialized firstly. For example,
we could find that PMIC mfd driver are initialized in subsys init call level.
It means that pinctrl should be initialized earlier than I2C/SPI bus driver.
Otherwise, pins of I2C bus may not be configured as I2C function since
pinctrl driver is module init call level.

Regards
Haojian

^ permalink raw reply

* Do we need to fix below dump during cpu hot plug operation?
From: Peter Chen @ 2012-10-19  1:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

When doing system suspend/resume or CPU hot plug at SMP platform (like 
Freescale i.mx6Q sabrelite board), if local time is enabled, 
there is a clk_get_rate at twd_timer_setup during the atomic context.
So, if mutex_lock debug is enabled, there will be below dump message.
Although it will not affect future system use, it is boring message.

BUG: sleeping function called from invalid context at /home/b29397/work/code/git/linus/linux-2.6/kernel/mutex.c:269
no locks held by swapper/1/0.
irq event stamp: 279320
hardirqs last  enabled at (279319): [<80052bd0>] idle_task_exit+0x16c/0x1a0
hardirqs last disabled at (279320): [<8051a470>] cpu_die+0x28/0x98
softirqs last  enabled at (279304): [<8002ae3c>] _local_bh_enable+0x14/0x18
softirqs last disabled at (279303): [<8002aea8>] irq_enter+0x68/0x78
Backtrace: 
[<8001284c>] (dump_backtrace+0x0/0x10c) from [<8052b614>] (dump_stack+0x18/0x1c)
 r7:8062b070 r6:0000010d r5:00000000 r4:bf88c000
[<8052b5fc>] (dump_stack+0x0/0x1c) from [<80050bb4>] (__might_sleep+0x1ec/0x238)
[<800509c8>] (__might_sleep+0x0/0x238) from [<8052cf60>] (mutex_lock_nested+0x38/0x3bc)
 r7:00000000 r6:bf88c000 r5:808b19e0 r4:808a5360
[<8052cf28>] (mutex_lock_nested+0x0/0x3bc) from [<803e2108>] (clk_get_rate+0x1c/0x84)
[<803e20ec>] (clk_get_rate+0x0/0x84) from [<8052900c>] (twd_timer_setup+0x28c/0x2e0)
 r5:808b19e0 r4:817c0200
[<80528d80>] (twd_timer_setup+0x0/0x2e0) from [<805288b8>] (percpu_timer_setup+0x6c/0xdc)
 r9:412fc09a r8:1000406a r7:808b19d8 r6:bf88c000 r5:80879c14
r4:817c0200
[<8052884c>] (percpu_timer_setup+0x0/0xdc) from [<80528a68>] (secondary_start_kernel+0x140/0x19c)
 r5:80879c14 r4:00000001
[<80528928>] (secondary_start_kernel+0x0/0x19c) from [<10528248>] (0x10528248)
 r7:808b19d8 r6:10c03c7d r5:0000001f r4:4f87806a
BUG: scheduling while atomic: swapper/1/0/0x40000002
no locks held by swapper/1/0.
Modules linked in:
irq event stamp: 279320
hardirqs last  enabled at (279319): [<80052bd0>] idle_task_exit+0x16c/0x1a0
hardirqs last disabled at (279320): [<8051a470>] cpu_die+0x28/0x98
softirqs last  enabled at (279304): [<8002ae3c>] _local_bh_enable+0x14/0x18
softirqs last disabled at (279303): [<8002aea8>] irq_enter+0x68/0x78
Backtrace: 
[<8001284c>] (dump_backtrace+0x0/0x10c) from [<8052b614>] (dump_stack+0x18/0x1c)
 r7:00000001 r6:bf88c000 r5:bf890000 r4:bf890000
[<8052b5fc>] (dump_stack+0x0/0x1c) from [<800539b4>] (__schedule_bug+0x5c/0x7c)
[<80053958>] (__schedule_bug+0x0/0x7c) from [<8052e1a8>] (__schedule+0x620/0x6e0)
 r5:bf890000 r4:819215c0
[<8052db88>] (__schedule+0x0/0x6e0) from [<8052e320>] (_cond_resched+0x44/0x58)
[<8052e2dc>] (_cond_resched+0x0/0x58) from [<8052cf64>] (mutex_lock_nested+0x3c/0x3bc)
 r5:808b19e0 r4:808a5360
[<8052cf28>] (mutex_lock_nested+0x0/0x3bc) from [<803e2108>] (clk_get_rate+0x1c/0x84)
[<803e20ec>] (clk_get_rate+0x0/0x84) from [<8052900c>] (twd_timer_setup+0x28c/0x2e0)
 r5:808b19e0 r4:817c0200
[<80528d80>] (twd_timer_setup+0x0/0x2e0) from [<805288b8>] (percpu_timer_setup+0x6c/0xdc)
 r9:412fc09a r8:1000406a r7:808b19d8 r6:bf88c000 r5:80879c14
r4:817c0200
[<8052884c>] (percpu_timer_setup+0x0/0xdc) from [<80528a68>] (secondary_start_kernel+0x140/0x19c)
 r5:80879c14 r4:00000001
[<80528928>] (secondary_start_kernel+0x0/0x19c) from [<10528248>] (0x10528248)
 r7:808b19d8 r6:10c03c7d r5:0000001f r4:4f87806a

-- 

Best Regards,
Peter Chen

^ permalink raw reply

* [PATCH v2] arm: omap: move OMAP USB platform data to <linux/platform_data/omap-usb.h>
From: Tony Lindgren @ 2012-10-19  1:49 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20121018054934.GE11137@arwen.pp.htv.fi>

* Felipe Balbi <balbi@ti.com> [121017 22:56]:
> Hi,
> 
> On Wed, Oct 17, 2012 at 01:34:04PM -0700, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [121017 08:54]:
> > > In order to make single zImage work for ARM architecture,
> > > we need to make sure we don't depend on private headers.
> > > 
> > > Move USB platform_data to <linux/platform_data/omap-usb.h>
> > > and keep only internal functions in <plat/usb.h>.
> > 
> > Thanks, looks like I can't make this apply against v3.7-rc1:
> > 
> > patching file arch/arm/plat-omap/include/plat/usb.h
> > Hunk #1 FAILED at 1.
> > Hunk #2 FAILED at 26.
> > Hunk #3 FAILED at 44.
> > Hunk #4 FAILED at 65.
> > Hunk #5 FAILED at 81.
> > Hunk #6 succeeded at 28 with fuzz 2 (offset -128 lines).
> > 5 out of 6 hunks FAILED -- rejects in file arch/arm/plat-omap/include/plat/usb.h
> > 
> > Can you please check it?
> 
> Are you sure you have a clean v3.7-rc1 ?

Yes. Figured it out, it fails to apply with quilt, but applies
with git.

But it does not compile with all configs though, and does
not remove plat/usb.h. Thanks anyways. I'll post a proper
series shortly with your patch fixed up.

Regards,

Tony

^ permalink raw reply

* [PATCH v2 2/2] mfd: Kconfig: Let MFD_SYSCON select REGMAP
From: Mark Brown @ 2012-10-19  1:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1350605046-21358-2-git-send-email-festevam@gmail.com>

On Thu, Oct 18, 2012 at 09:04:06PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Building multi_v7_defconfig for mx6 causes the following build error:

> Fix it by selecting REGMAP option.

No, this is silly - selecting MMIO ought to do the right thing.  There's
a patch queued for Linus which will resolve this.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox