Re: [PATCH v1 1/3] powerpc, 8xx: remove support for 8xx

2017-06-14 Thread Heiko Schocher

Hello Christophe,

Am 14.06.2017 um 09:40 schrieb Christophe LEROY:



Le 13/06/2017 à 09:37, Heiko Schocher a écrit :

Hello Christophe,

Am 13.06.2017 um 07:40 schrieb Christophe LEROY:



Le 13/06/2017 à 07:26, Christophe LEROY a écrit :

There was for long time no activity in the 8xx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in 8xx,
so remove it (with a heavy heart, knowing that I remove
here the root of U-Boot).

Signed-off-by: Heiko Schocher <h...@denx.de>



Please don't do that.


Tom already applied the patch to mainline ...


Can be reverted ?




As you can see in Linux kernel activity, there have been a lot activity related 
to the 8xx,
including but not limited to:
1/ HW Crypto for the 885 (Talitos SEC1)
2/ TX NAPI in the 8xx Ethernet driver
3/ Scatter/Gather support in the 8xx Ethernet driver
4/ Hugepages
5/ Perf events
6/ hw breakpoints
7/ Linear memory mapping via Large TLBs


Thats linux ... not u-boot!


Sure, but it shows there is still interest to that processor. The 885 is a good 
recent 8xx.
u-boot is not really something we focus on. We update it once a year, as far as 
it can start our
Linux box we are happy.


Hmm...


The followings links give an overview of the activity:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/drivers/crypto/talitos.c
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c


https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/arch/powerpc/kernel/head_8xx.S


https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/arch/powerpc/mm/8xx_mmu.c


We have thousands of boards with mpc885 running and requiring support for at 
least the next 10
years.


Ok, nice to hear!


How can the 8xx survive without U-boot support ?


Tom asked (I think a lot of times) regarding converting mpc8xx to
Kconfig / DM and nobody did the necessary steps. We also asked
our customers if they can do the necessary changes, none was interested.


I did't know. Indeed I was not following uboot activity until someone who knows 
the level of
interest we have in 8xx alerted me yesterday.
It would have been nice if you had notified linuxppc-dev list.



So, if you need mpc8xx support in U-Boot, simply add it again with
Kconfig and DM support included!


Ok, I'll try and come with a patch to convert 8xx in the coming weeks. In the 
mean time please
revert the deletion in order to avoid nightmare conflicts when the converting 
patch comes.


I vote for making a patch which adds new mpc8xx support, as we had a lot
of crap in the code, but thats Tom decision!

bye,
Heiko
--
--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


spi, spi_fsl-spi.c not working?

2014-07-17 Thread Heiko Schocher

Hello all,

I just tried a mpc83xx based board (similiar to the mpc8313erdb)
with linux v3.16-rc4 using the drivers/spi/spi-fsl-spi.c driver.
DT nodes for spi are the same as in arch/powerpc/boot/dts/mpc8313erdb.dts:

spi@7000 {
cell-index = 0;
compatible = fsl,spi;
reg = 0x7000 0x1000;
interrupts = 16 0x8;
interrupt-parent = ipic;
mode = cpu;
};

Bootlog shows:

[1.341411] fsl_spi f0007000.spi: master is unqueued, this is deprecated
[1.554405] [ cut here ]
[1.559080] WARNING: at c023a958 [verbose debug info unavailable]
[1.565208] Modules linked in:
[1.568305] CPU: 0 PID: 1 Comm: swapper Not tainted 
3.16.0-rc4-ids720-patch1-01642-g69ef753 #20
[1.577059] task: c782c000 ti: c781a000 task.ti: c781a000
[1.582493] NIP: c023a958 LR: c0238bfc CTR: c027884c
[1.587491] REGS: c781bb80 TRAP: 0700   Not tainted  
(3.16.0-rc4-ids720-patch1-01642-g69ef753)
[1.596149] MSR: 00029032 EE,ME,IR,DR,RI  CR: 22002044  XER: 
[1.602851]
GPR00: c0238bfc c781bc30 c782c000 c051421c c6c62a00 c6c62b06 c03e392c 0002
GPR08: c03de53c 0001 c6c62ab8 1032 82002042  c0004158 
GPR16:     c0495c54 c0495cbc c0495cc8 c0495cd4
GPR24:    c050c6a4 c051421c c0544aa8 c054 c6c62a00
[1.632952] NIP [c023a958] driver_probe_device+0x58/0x230
[1.638397] LR [c0238bfc] bus_for_each_drv+0x50/0xac
[1.643390] Call Trace:
[1.645865] [c781bc30] [c023abf0] __device_attach+0x0/0x70 (unreliable)
[1.652539] [c781bc50] [c0238bfc] bus_for_each_drv+0x50/0xac
[1.658247] [c781bc80] [c023a8bc] device_attach+0xb4/0xd8
[1.663693] [c781bca0] [c0239dd4] bus_probe_device+0xa0/0xc4
[1.669400] [c781bcc0] [c0237d68] device_add+0x384/0x520
[1.674762] [c781bd00] [c0279298] spi_add_device+0xb0/0x170
[1.680383] [c781bd20] [c027aac4] spi_register_master+0x500/0x75c
[1.686530] [c781bd70] [c027e138] of_fsl_spi_probe+0x494/0x594
[1.692413] [c781bdd0] [c023c1ac] platform_drv_probe+0x28/0x68
[1.698297] [c781bde0] [c023a98c] driver_probe_device+0x8c/0x230
[1.704353] [c781be00] [c023abec] __driver_attach+0xbc/0xc0
[1.709972] [c781be20] [c0238cb4] bus_for_each_dev+0x5c/0xa8
[1.715681] [c781be50] [c023a038] bus_add_driver+0xf4/0x1e4
[1.721300] [c781be70] [c023b394] driver_register+0x88/0x130
[1.727013] [c781be80] [c0003ad0] do_one_initcall+0x8c/0x210
[1.732732] [c781bef0] [c04d30ac] kernel_init_freeable+0x114/0x1c0
[1.738962] [c781bf30] [c0004170] kernel_init+0x18/0x108
[1.744331] [c781bf40] [c000e830] ret_from_kernel_thread+0x5c/0x64
[1.750549] Instruction dump:

Did someone detected such a problem with this driver?

Is it maybe the missing support for the SPI subsystem's queue SPI messages?

Any hints?

Thanks!

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: spi, spi_fsl-spi.c not working?

2014-07-17 Thread Heiko Schocher

Hello Mark,

Am 17.07.2014 13:31, schrieb Mark Brown:

On Thu, Jul 17, 2014 at 11:11:45AM +0200, Heiko Schocher wrote:


Is it maybe the missing support for the SPI subsystem's queue SPI messages?


It shouldn't be that, that's still optional (sadly).


Thanks for this info! I digging in it ...

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH][RFC] mmc, sd: do not read switch, if the host do not support high speed

2012-12-16 Thread Heiko Schocher
If the host controller do not support high speed, do not send the
read switch CMD 6. Same as done in mmc_sd_switch_hs().

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Wolfgang Denk w...@denx.de
Cc: Dieter Schaffner dieter.schaff...@ids.de
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-...@vger.kernel.org

---
 drivers/mmc/core/sd.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

Found this on a MPC8313 based system with mmc over spi and a Transcend
2 GB SD card running a 2.6.37.6 kernel. Without this patch I get this
when reading the CMD6:

mmc1: starting CMD6 arg 00f1 flags 00b5
mmc1: blksz 64 blocks 1 flags 0200 tsac 100 ms nsac 0
mmc_spi spi1.2:   mmc_spi: CMD6, resp R1
mmc_spi spi1.2: mmc_spi: read block, 64 bytes
mmc_spi spi1.2: read error ff92 (-110)
mmc_spi spi1.2: read status -110
mmc1: req done (CMD6): 0:    
mmc1: 0 bytes transferred: -110

Adding for example a longer timeout for the CMD6 did not helped.

With this patch the transcend card gets detected and can be used
fine. Here the infos from the card, shown in the sysfs:

-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/cid 
1b534d3030303030100bc3874c00c10b
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/csd 
007fff325b5a83baf6dbdfff0e8000b5
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/date 
01/2012
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/erase_size 
512
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/fwrev  
0x0
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/hwrev 
0x1
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/manfid 
0x1b
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/name   
0
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/oemid 
0x534d
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/preferred_erase_size 
4194304
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/scr  
02258000
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/serial 
0x0bc3874c
-bash-3.2# cat /sys/bus/mmc/devices/mmc0\:/type 
SD

So the question raises, is this a known bug and/or a valid patch?
Other patches known to help here?

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 49da4df..3142df0 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -268,6 +268,10 @@ static int mmc_read_switch(struct mmc_card *card)
return 0;
}
 
+   /* no need, if the host do not support high speed */
+   if (!(card-host-caps  MMC_CAP_SD_HIGHSPEED))
+   return 0;
+
err = -EIO;
 
status = kmalloc(64, GFP_KERNEL);
-- 
1.7.7.6

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Please pull 'next' branch of 5xxx tree

2011-09-30 Thread Heiko Schocher
Hello Grant,

On Thu, 29 Sep 2011 07:49:07 -0500 Grant wrote:
 On Sep 29, 2011 4:31 AM, Anatolij Gustschin ag...@denx.de wrote:
  
   Hi Ben,
  
   please pull another two mpc5xxx patches for next. These patches were
   queued in Grant's 'powerpc/next' branch a while ago, but a pull request
   have never been submitted for them. Thanks!
  
   Anatolij
  
   The following changes since commit 
   7680057cc4c7d9caada12767831bfd9738dd7b43:
  
powerpc: Don't try OPAL takeover on old 970 blades (2011-09-29 
   17:04:59+1000)
  
   are available in the git repository at:
git://git.denx.de/linux-2.6-agust.git next
  
   Grant Likely (1):
powerpc/5200: add support for charon board

 Hmmm, I didn't actually write this patch. It looks like the author credit
 got screwed up at some point.

I am not got screwed up, I just waiting for an answer, as I wrote here:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-August/092040.html:
Thanks for your review! I wait for a comment on patch
http://patchwork.ozlabs.org/patch/91919/ from you and rework this
2 patches.

I just forgot to trigger you ;-)

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Please pull 'next' branch of 5xxx tree

2011-09-30 Thread Heiko Schocher
Hello Grant,

Heiko Schocher wrote:
 Hello Grant,
 
 On Thu, 29 Sep 2011 07:49:07 -0500 Grant wrote:
 On Sep 29, 2011 4:31 AM, Anatolij Gustschin ag...@denx.de wrote:
 Hi Ben,

 please pull another two mpc5xxx patches for next. These patches were
 queued in Grant's 'powerpc/next' branch a while ago, but a pull request
 have never been submitted for them. Thanks!

 Anatolij

 The following changes since commit 
 7680057cc4c7d9caada12767831bfd9738dd7b43:

  powerpc: Don't try OPAL takeover on old 970 blades (2011-09-29 
 17:04:59+1000)

 are available in the git repository at:
  git://git.denx.de/linux-2.6-agust.git next

 Grant Likely (1):
  powerpc/5200: add support for charon board
 Hmmm, I didn't actually write this patch. It looks like the author credit
 got screwed up at some point.
 
 I am not got screwed up, I just waiting for an answer, as I wrote here:
 
 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-August/092040.html:
 Thanks for your review! I wait for a comment on patch
 http://patchwork.ozlabs.org/patch/91919/ from you and rework this
 2 patches.
 
 I just forgot to trigger you ;-)

Sorry, was the wrong board ...

For the charon board I have this info from you:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-May/089852.html
I did pick them up and they are in my tree.  Actually, I squashed
those two together since there was no reason to have them split apart.

So, I thought its on the right way ...

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 2/4] powerpc, mpc52xx: add a4m072 board support

2011-07-31 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Wed, Jun 22, 2011 at 12:39:10PM +0200, Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: Grant Likely grant.lik...@secretlab.ca
 cc: devicetree-disc...@ozlabs.org
 cc: Wolfgang Denk w...@denx.de
 cc: Wolfram Sang w.s...@pengutronix.de
 ---
 For this patchseries following patch is needed:

 http://patchwork.ozlabs.org/patch/91919/

 Grant? Do you have some comments on that patch?

 changes for v2:
   add comment from Wolfram Sang:
   use mpc5200.dtsi

  arch/powerpc/boot/dts/a4m072.dts |  172 
 ++
  arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
  2 files changed, 173 insertions(+), 0 deletions(-)
  create mode 100644 arch/powerpc/boot/dts/a4m072.dts

 diff --git a/arch/powerpc/boot/dts/a4m072.dts 
 b/arch/powerpc/boot/dts/a4m072.dts
 new file mode 100644
 index 000..adb6746
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/a4m072.dts
 @@ -0,0 +1,172 @@
 +/*
 + * a4m072 board Device Tree Source
 + *
 + * Copyright (C) 2011 DENX Software Engineering GmbH
 + * Heiko Schocher h...@denx.de
 + *
 + * Copyright (C) 2007 Semihalf
 + * Marian Balakowicz m...@semihalf.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/ mpc5200b.dtsi
 
 Ah, I missed this follow up patch.  Yes, this is better.

;-)

 +
 +/ {
 +model = anonymous,a4m072;
 +compatible = anonymous,a4m072;

The customer don;t want, that his name appear, so I decided here,
to use anonymous ... what name should used here?

 +
 +soc5200@f000 {
 +#address-cells = 1;
 +#size-cells = 1;
 +compatible = fsl,mpc5200b-immr;
 +ranges = 0 0xf000 0xc000;
 +reg = 0xf000 0x0100;
 +bus-frequency = 0; /* From boot loader */
 +system-frequency = 0; /* From boot loader */
 +
 +cdm@200 {
 +fsl,ext_48mhz_en = 0x0;
 +fsl,fd_enable = 0x01;
 +fsl,fd_counters = 0x;
 
 Are these new properties documented?  They need to be.  Also,
 convention is to use '-' instead of '_' in property names.

Yes, see patch here:

 For this patchseries following patch is needed:

 http://patchwork.ozlabs.org/patch/91919/

 +};
 +
 +timer@600 {
 +compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
 +reg = 0x600 0x80;
 +interrupts = 1 9 0;
 +fsl,has-wdt;
 +};
 
 Isn't this node already in the mpc5200b.dtsi file?

Yes, you are right, remove this.

 Otherwise, this patch looks pretty good.

Thanks for your review! I wait for a comment on patch
http://patchwork.ozlabs.org/patch/91919/ from you and rework this
2 patches.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 2/4] powerpc, mpc52xx: add a4m072 board support

2011-07-25 Thread Heiko Schocher
Hello,

Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: Grant Likely grant.lik...@secretlab.ca
 cc: devicetree-disc...@ozlabs.org
 cc: Wolfgang Denk w...@denx.de
 cc: Wolfram Sang w.s...@pengutronix.de
 ---
 For this patchseries following patch is needed:
 
 http://patchwork.ozlabs.org/patch/91919/
 
 Grant? Do you have some comments on that patch?
 
 changes for v2:
   add comment from Wolfram Sang:
   use mpc5200.dtsi
 
  arch/powerpc/boot/dts/a4m072.dts |  172 
 ++
  arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
  2 files changed, 173 insertions(+), 0 deletions(-)
  create mode 100644 arch/powerpc/boot/dts/a4m072.dts

Are there some more comments or is this ready for going
to mainline?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/4] net, phy: am79c874 support

2011-07-25 Thread Heiko Schocher
Hello,

Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: linux-net...@vger.kernel.org
 cc: Wolfgang Denk w...@denx.de
 ---
  drivers/net/phy/Kconfig  |5 ++
  drivers/net/phy/Makefile |1 +
  drivers/net/phy/amd79.c  |  109 
 ++
  3 files changed, 115 insertions(+), 0 deletions(-)
  create mode 100644 drivers/net/phy/amd79.c

Are there some more comments or is this patch ready for going
to mainline?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 0/4] powerpc, mpc5200: add support for a4m072 board

2011-06-22 Thread Heiko Schocher
- Add PHY support (AMD am79c874)
- Add DTS to support a4m072 board
- Update mpc5200_defconfig
- Add config options needed for a4m072 board support
  to mpc5200_defconfig 

cc: Wolfgang Denk w...@denx.de

Heiko Schocher (4):
  net, phy: am79c874 support
  powerpc, mpc5200: add a4m072 board support
  powerpc, mpc5200: update mpc5200_defconfig
  powerpc, mpc5200: add options to mpc5200_defconfig

 arch/powerpc/boot/dts/a4m072.dts |  273 ++
 arch/powerpc/configs/mpc5200_defconfig   |   15 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 drivers/net/phy/Kconfig  |5 +
 drivers/net/phy/Makefile |1 +
 drivers/net/phy/amd79.c  |  109 ++
 6 files changed, 395 insertions(+), 9 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts
 create mode 100644 drivers/net/phy/amd79.c

-- 
1.7.5.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/4] net, phy: am79c874 support

2011-06-22 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-net...@vger.kernel.org
cc: Wolfgang Denk w...@denx.de
---
 drivers/net/phy/Kconfig  |5 ++
 drivers/net/phy/Makefile |1 +
 drivers/net/phy/amd79.c  |  109 ++
 3 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/amd79.c

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index a702443..ee70d04 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -15,6 +15,11 @@ if PHYLIB
 
 comment MII PHY device drivers
 
+config AMD_PHY
+   tristate Drivers for the AMD79 PHYs
+   ---help---
+ Currently supports the amd79c874
+
 config MARVELL_PHY
tristate Drivers for Marvell PHYs
---help---
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 2333215..79bc8b4 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -23,3 +23,4 @@ obj-$(CONFIG_DP83640_PHY) += dp83640.o
 obj-$(CONFIG_STE10XP)  += ste10Xp.o
 obj-$(CONFIG_MICREL_PHY)   += micrel.o
 obj-$(CONFIG_MDIO_OCTEON)  += mdio-octeon.o
+obj-$(CONFIG_AMD_PHY)  += amd79.o
diff --git a/drivers/net/phy/amd79.c b/drivers/net/phy/amd79.c
new file mode 100644
index 000..914d696
--- /dev/null
+++ b/drivers/net/phy/amd79.c
@@ -0,0 +1,109 @@
+/*
+ * Driver for AMD am79 PHYs
+ *
+ * Author: Heiko Schocher h...@denx.de
+ *
+ * Copyright (c) 2011 DENX Software Engineering GmbH
+ *
+ * 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/kernel.h
+#include linux/string.h
+#include linux/errno.h
+#include linux/unistd.h
+#include linux/interrupt.h
+#include linux/init.h
+#include linux/io.h
+#include linux/delay.h
+#include linux/netdevice.h
+#include linux/etherdevice.h
+#include linux/skbuff.h
+#include linux/spinlock.h
+#include linux/mm.h
+#include linux/module.h
+#include linux/mii.h
+#include linux/ethtool.h
+#include linux/phy.h
+#include linux/uaccess.h
+
+#include asm/irq.h
+
+#define MII_AMD79_IR   17  /* Interrupt Status/Control Register */
+#define MII_AMD79_IR_EN_LINK   0x0400  /* IR enable Linkstate */
+#define MII_AMD79_IR_ACK_LINK  0x0004  /* IR ack Linkstate */
+
+MODULE_DESCRIPTION(AMD PHY driver);
+MODULE_AUTHOR(Heiko Schocher h...@denx.de);
+MODULE_LICENSE(GPL);
+
+static int amd79_ack_interrupt(struct phy_device *phydev)
+{
+   int err;
+
+   err = phy_read(phydev, MII_BMSR);
+   if (err  0)
+   return err;
+
+   err = phy_read(phydev, MII_AMD79_IR);
+   if (err  0)
+   return err;
+
+   return 0;
+}
+
+static int amd79_config_init(struct phy_device *phydev)
+{
+   int err = 0;
+
+   return err;
+}
+
+static int amd79_config_intr(struct phy_device *phydev)
+{
+   int err;
+
+   if (phydev-interrupts == PHY_INTERRUPT_ENABLED)
+   err = phy_write(phydev, MII_AMD79_IR_EN_LINK,
+   MII_AMD79_IR_EN_LINK);
+   else
+   err = phy_write(phydev, MII_AMD79_IR_EN_LINK, 0);
+
+   return err;
+}
+
+static struct phy_driver amd79_driver = {
+   .phy_id = 0x0022561b,
+   .name   = AMD79C874,
+   .phy_id_mask= 0xfff0,
+   .features   = PHY_BASIC_FEATURES,
+   .flags  = PHY_HAS_INTERRUPT,
+   .config_init= amd79_config_init,
+   .config_aneg= genphy_config_aneg,
+   .read_status= genphy_read_status,
+   .ack_interrupt  = amd79_ack_interrupt,
+   .config_intr= amd79_config_intr,
+   .driver = { .owner = THIS_MODULE,},
+};
+
+static int __init amd79_init(void)
+{
+   int ret;
+
+   ret = phy_driver_register(amd79_driver);
+   if (ret)
+   return ret;
+
+   return 0;
+}
+
+static void __exit amd79_exit(void)
+{
+   phy_driver_unregister(amd79_driver);
+}
+
+module_init(amd79_init);
+module_exit(amd79_exit);
-- 
1.7.5.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/4] powerpc, mpc52xx: add a4m072 board support

2011-06-22 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: devicetree-disc...@ozlabs.org
cc: Wolfgang Denk w...@denx.de
---
For this patchseries following patch is needed:

http://patchwork.ozlabs.org/patch/91919/

Grant? Do you have some comments on that patch?

 arch/powerpc/boot/dts/a4m072.dts |  273 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 274 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts

diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
new file mode 100644
index 000..cea1c6f
--- /dev/null
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -0,0 +1,273 @@
+/*
+ * a4m072 board Device Tree Source
+ *
+ * Copyright (C) 2011 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz m...@semihalf.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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = anonymous,a4m072;
+   compatible = anonymous,a4m072;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5200@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0; /* From boot loader */
+   bus-frequency = 0; /* From boot loader */
+   clock-frequency = 0; /* From boot loader */
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;
+   };
+
+   soc5200@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0; /* From boot loader */
+   system-frequency = 0; /* From boot loader */
+
+   cdm@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   fsl,ext_48mhz_en = 0x0;
+   fsl,fd_enable = 0x01;
+   fsl,fd_counters = 0x;
+   };
+
+   mpc5200_pic: interrupt-controller@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   };
+
+   timer@600 {
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x600 0x80;
+   interrupts = 1 9 0;
+   fsl,has-wdt;
+   };
+
+   gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x630 0x10;
+   interrupts = 1 12 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x640 0x10;
+   interrupts = 1 13 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x650 0x10;
+   interrupts = 1 14 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   can@900 {
+   compatible = fsl,mpc5200b-mscan,fsl,mpc5200-mscan;
+   interrupts = 2 17 0;
+   reg = 0x900 0x80;
+   };
+
+   can@980 {
+   compatible = fsl,mpc5200b-mscan,fsl,mpc5200-mscan;
+   interrupts = 2 18 0;
+   reg = 0x980 0x80;
+   };
+
+   gpio_simple: gpio@b00 {
+   compatible = fsl,mpc5200b-gpio,fsl,mpc5200-gpio;
+   reg

[PATCH 3/4] powerpc, mpc5200: update mpc5200_defconfig

2011-06-22 Thread Heiko Schocher
just made a

make mpc5200_defconfig
make savedefconfig
cp defconfig arch/powerpc/configs/mpc5200_defconfig

So changes needed in mpc5200_defconfig for a4m072 board support
better indicated.

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfgang Denk w...@denx.de
---
 arch/powerpc/configs/mpc5200_defconfig |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index e63f537..b3e27f6 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -1,8 +1,8 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
@@ -20,8 +20,6 @@ CONFIG_PPC_BESTCOMM=y
 CONFIG_SIMPLE_GPIO=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_PM=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -36,10 +34,7 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_IPV6 is not set
 CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
 CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
@@ -115,7 +110,6 @@ CONFIG_RTC_DRV_DS1307=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_PROC_KCORE=y
@@ -133,5 +127,4 @@ CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
-- 
1.7.5.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 4/4] powerpc, mpc5200: add options to mpc5200_defconfig

2011-06-22 Thread Heiko Schocher
Add the following options to the mpc5200_defconfig, needed
for the a4m072 board support:

CONFIG_AMD_PHY=y
CONFIG_MTD_PLATRAM=y - this deletes CONFIG_MTD_RAM=y
CONFIG_GPIO_SYSFS=y
CONFIG_SENSORS_LM87=m
CONFIG_RTC_DRV_PCF8563=m

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfgang Denk w...@denx.de
---
 arch/powerpc/configs/mpc5200_defconfig |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index b3e27f6..1e64591 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -39,9 +39,9 @@ CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_RAM=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_PLATRAM=y
 CONFIG_MTD_UBI=m
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
@@ -56,6 +56,7 @@ CONFIG_ATA=y
 CONFIG_PATA_MPC52xx=y
 CONFIG_PATA_PLATFORM=y
 CONFIG_NETDEVICES=y
+CONFIG_AMD_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC_MPC52xx=y
@@ -75,6 +76,8 @@ CONFIG_SPI_GPIO=m
 CONFIG_SPI_MPC52xx=m
 CONFIG_SPI_MPC52xx_PSC=m
 CONFIG_SPI_SPIDEV=m
+CONFIG_GPIO_SYSFS=y
+CONFIG_SENSORS_LM87=m
 CONFIG_WATCHDOG=y
 CONFIG_DRM=y
 CONFIG_VIDEO_OUTPUT_CONTROL=y
@@ -107,6 +110,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_NEW_LEDS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_PCF8563=m
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-- 
1.7.5.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/4] powerpc, mpc52xx: add a4m072 board support

2011-06-22 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Wed, Jun 22, 2011 at 09:55:09AM +0200, Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: Grant Likely grant.lik...@secretlab.ca
 cc: devicetree-disc...@ozlabs.org
 cc: Wolfgang Denk w...@denx.de
 ---
 For this patchseries following patch is needed:

 http://patchwork.ozlabs.org/patch/91919/

 Grant? Do you have some comments on that patch?
 
 Can you use the mpc5200-include?

Sorry, cannot parse this ...

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2 2/4] powerpc, mpc52xx: add a4m072 board support

2011-06-22 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: devicetree-disc...@ozlabs.org
cc: Wolfgang Denk w...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
---
For this patchseries following patch is needed:

http://patchwork.ozlabs.org/patch/91919/

Grant? Do you have some comments on that patch?

changes for v2:
  add comment from Wolfram Sang:
  use mpc5200.dtsi

 arch/powerpc/boot/dts/a4m072.dts |  172 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 173 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts

diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
new file mode 100644
index 000..adb6746
--- /dev/null
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -0,0 +1,172 @@
+/*
+ * a4m072 board Device Tree Source
+ *
+ * Copyright (C) 2011 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz m...@semihalf.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/ mpc5200b.dtsi
+
+/ {
+   model = anonymous,a4m072;
+   compatible = anonymous,a4m072;
+
+   soc5200@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0; /* From boot loader */
+   system-frequency = 0; /* From boot loader */
+
+   cdm@200 {
+   fsl,ext_48mhz_en = 0x0;
+   fsl,fd_enable = 0x01;
+   fsl,fd_counters = 0x;
+   };
+
+   timer@600 {
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x600 0x80;
+   interrupts = 1 9 0;
+   fsl,has-wdt;
+   };
+
+   gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   spi@f00 {
+   status = disabled;
+   };
+
+   psc@2000 {
+   compatible = 
fsl,mpc5200b-psc-uart,fsl,mpc5200-psc-uart;
+   reg = 0x2000 0x100;
+   interrupts = 2 1 0;
+   };
+
+   psc@2200 {
+   compatible = 
fsl,mpc5200b-psc-uart,fsl,mpc5200-psc-uart;
+   reg = 0x2200 0x100;
+   interrupts = 2 2 0;
+   };
+
+   psc@2400 {
+   compatible = 
fsl,mpc5200b-psc-uart,fsl,mpc5200-psc-uart;
+   reg = 0x2400 0x100;
+   interrupts = 2 3 0;
+   };
+
+   psc@2600 {
+   status = disabled;
+   };
+
+   psc@2800 {
+   status = disabled;
+   };
+
+   psc@2c00 {
+   compatible = 
fsl,mpc5200b-psc-uart,fsl,mpc5200-psc-uart;
+   reg = 0x2c00 0x100;
+   interrupts = 2 4 0;
+   };
+
+   ethernet@3000 {
+   phy-handle = phy0;
+   };
+
+   mdio@3000 {
+   phy0: ethernet-phy@1f {
+   reg = 0x1f;
+   interrupts = 1 2 0; /* IRQ 2 active low */
+   };
+   };
+
+   i2c@3d00 {
+   status = disabled;
+   };
+
+   i2c@3d40 {
+hwmon@2e {
+   compatible = nsc,lm87;
+   reg = 0x2e;
+   };
+rtc@51 {
+   compatible = nxp,rtc8564;
+   reg = 0x51;
+   };
+   };
+   };
+
+   localbus

Re: [PATCH v6 0/6] powerpc, 52xx: add charon board support

2011-05-03 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Mon, May 2, 2011 at 11:17 PM, Heiko Schocher h...@denx.de wrote:
 Hello Grant,

 Grant Likely wrote:
 On Tue, Mar 22, 2011 at 09:27:26AM +0100, Heiko Schocher wrote:
 cc: Wolfram Sang w.s...@pengutronix.de
 cc: Grant Likely grant.lik...@secretlab.ca
 cc: Benjamin Herrenschmidt b...@kernel.crashing.org
 cc: linux-fb...@vger.kernel.org
 cc: devicetree-disc...@ozlabs.org
 cc: Ben Dooks b...@simtec.co.uk
 cc: Vincent Sanders vi...@simtec.co.uk
 cc: Samuel Ortiz sa...@linux.intel.com
 cc: linux-ker...@vger.kernel.org
 cc: Randy Dunlap rdun...@xenotime.net
 cc: Wolfgang Denk w...@denx.de
 cc: Paul Mundt let...@linux-sh.org

 changes since v5:
 - repost complete patchseries, as Paul Mundt suggested
 - rebased against current head
 - add Acked-by from Samuel Ortiz (MFD parts)
   http://www.spinics.net/lists/linux-fbdev/msg02550.html
   http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

   and Benjamin Herrenschmidt (DTS parts)
   http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html
 - removed patch
   powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.
   therefore added
   powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.
 Refresh my memory, why was the mpc5200_defconfig updated dropped?
 Because it is a board based on the tqm5200 board port ... no other
 reason.
 
 Please send a patch to also update the mpc5200_defconfig.

Ok. Done, just one more question:

Why you didn;t pick up the patches:

- powerpc, 5200: add support for charon board
  (Got an Acked-by from Wolfram Sang)
- powerpc, video: add SM501 support for charon board.

Are there any issues with them, I should fix?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/2] powerpc, mpc52xx: update defconfig

2011-05-03 Thread Heiko Schocher
Did following steps:

make mpc5200_defconfig
make savedefconfig
cp defconfig arch/powerpc/configs/mpc5200_defconfig

Signed-off-by: Heiko Schocher h...@denx.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Wolfgang Denk w...@denx.de
---
based against:
git://git.secretlab.ca/git/linux-2.6

Grant: Don;t know, if this patch is needed, but with it,
the next patch shows only the changes I need for the
charon board support.

./scripts/checkpatch.pl 0001-powerpc-mpc52xx-update-defconfig.patch
total: 0 errors, 0 warnings, 36 lines checked

0001-powerpc-mpc52xx-update-defconfig.patch has no obvious style problems and 
is ready for submission.

 arch/powerpc/configs/mpc5200_defconfig |7 +--
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index e63f537..e9813a7 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -1,5 +1,6 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -20,8 +21,6 @@ CONFIG_PPC_BESTCOMM=y
 CONFIG_SIMPLE_GPIO=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_PM=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -36,10 +35,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_IPV6 is not set
 CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
 CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
 CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
@@ -115,7 +112,6 @@ CONFIG_RTC_DRV_DS1307=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_PROC_KCORE=y
@@ -133,5 +129,4 @@ CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
-- 
1.7.4.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/2] powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.

2011-05-03 Thread Heiko Schocher
Add:

- CONFIG_MTD_PLATRAM=y
  (selects CONFIG_MTD_RAM, so this is removed)
- CONFIG_FIXED_PHY=y
- CONFIG_SENSORS_LM80=y
- CONFIG_FB_FOREIGN_ENDIAN=y
- CONFIG_FB_SM501=m
- CONFIG_RTC_DRV_DS1374=y

also to the mpc5200_defconfig, as Grant suggested here:
http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-May/089844.html

Signed-off-by: Heiko Schocher h...@denx.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Wolfgang Denk w...@denx.de
---
based against:
git://git.secretlab.ca/git/linux-2.6

./scripts/checkpatch.pl 
0002-powerpc-mpc5200-update-mpc5200_defconfig-to-fit-for-.patch
total: 0 errors, 0 warnings, 39 lines checked

0002-powerpc-mpc5200-update-mpc5200_defconfig-to-fit-for-.patch has no obvious 
style problems and is ready for submission.

 arch/powerpc/configs/mpc5200_defconfig |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index e9813a7..7a0bcd7 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -41,9 +41,9 @@ CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_RAM=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_PLATRAM=y
 CONFIG_MTD_UBI=m
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
@@ -59,6 +59,7 @@ CONFIG_PATA_MPC52xx=y
 CONFIG_PATA_PLATFORM=y
 CONFIG_NETDEVICES=y
 CONFIG_LXT_PHY=y
+CONFIG_FIXED_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC_MPC52xx=y
 # CONFIG_NETDEV_1000 is not set
@@ -77,11 +78,15 @@ CONFIG_SPI_GPIO=m
 CONFIG_SPI_MPC52xx=m
 CONFIG_SPI_MPC52xx_PSC=m
 CONFIG_SPI_SPIDEV=m
+CONFIG_SENSORS_LM80=y
 CONFIG_WATCHDOG=y
+CONFIG_MFD_SM501=m
 CONFIG_DRM=y
 CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_FB=y
+CONFIG_FB_FOREIGN_ENDIAN=y
 CONFIG_FB_RADEON=y
+CONFIG_FB_SM501=m
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
@@ -109,6 +114,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_NEW_LEDS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_DS1374=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-- 
1.7.4.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v6 3/6] video, sm501: add edid and commandline support

2011-05-02 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Mon, May 2, 2011 at 4:27 PM, Grant Likely grant.lik...@secretlab.ca 
 wrote:
 On Tue, Mar 22, 2011 at 09:27:29AM +0100, Heiko Schocher wrote:
 - add commandline options:
   sm501fb.mode:
 Specify resolution as xresxyres[-bpp][@refresh]
   sm501fb.bpp:
 Specify bit-per-pixel if not specified mode

 - Add support for encoding display mode information
   in the device tree using verbatim EDID block.

   If the edid entry in the smi,sm501 node is present,
   the driver will build mode database using EDID data
   and allow setting the display modes from this database.

 Signed-off-by: Heiko Schocher h...@denx.de
 Merged, thanks.
 
 This patch causes the following build warning:

Hups ... when I posted the patch, it compiled clean ...

   MODPOST vmlinux.o
 WARNING: vmlinux.o(.text+0x1d5572): Section mismatch in reference from
 the function sm501fb_init_fb() to the variable
 .devinit.data:sm501_default_mode
 The function sm501fb_init_fb() references
 the variable __devinitdata sm501_default_mode.
 This is often because sm501fb_init_fb lacks a __devinitdata
 annotation or the annotation of sm501_default_mode is wrong.
 
 WARNING: vmlinux.o(.text+0x1d557a): Section mismatch in reference from
 the function sm501fb_init_fb() to the variable
 .devinit.data:sm501_default_mode
 The function sm501fb_init_fb() references
 the variable __devinitdata sm501_default_mode.
 This is often because sm501fb_init_fb lacks a __devinitdata
 annotation or the annotation of sm501_default_mode is wrong.
 
 I've dropped the __devinitdata declaration in what I committed; can
 you investigate and post a fixup patch?

Of course, I look ASAP at it, thanks!
(Dummy question: where can I find your tree?)

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v6 0/6] powerpc, 52xx: add charon board support

2011-05-02 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Tue, Mar 22, 2011 at 09:27:26AM +0100, Heiko Schocher wrote:
 cc: Wolfram Sang w.s...@pengutronix.de
 cc: Grant Likely grant.lik...@secretlab.ca
 cc: Benjamin Herrenschmidt b...@kernel.crashing.org
 cc: linux-fb...@vger.kernel.org
 cc: devicetree-disc...@ozlabs.org
 cc: Ben Dooks b...@simtec.co.uk
 cc: Vincent Sanders vi...@simtec.co.uk
 cc: Samuel Ortiz sa...@linux.intel.com
 cc: linux-ker...@vger.kernel.org
 cc: Randy Dunlap rdun...@xenotime.net
 cc: Wolfgang Denk w...@denx.de
 cc: Paul Mundt let...@linux-sh.org

 changes since v5:
 - repost complete patchseries, as Paul Mundt suggested
 - rebased against current head
 - add Acked-by from Samuel Ortiz (MFD parts)
   http://www.spinics.net/lists/linux-fbdev/msg02550.html
   http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

   and Benjamin Herrenschmidt (DTS parts)
   http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html
 - removed patch 
   powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.
   therefore added
   powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.
 
 Refresh my memory, why was the mpc5200_defconfig updated dropped?

Because it is a board based on the tqm5200 board port ... no other
reason.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH][RFC] mpc52xx, common: setup port_config and cdm settings through DTS

2011-04-19 Thread Heiko Schocher
If firmware does not setup the GPS Port Configuration Register
and the CDM 48MHz Fractional Divider Configuration Register,
it can be corrected through DTS.

Signed-off-by: Heiko Schocher h...@denx.de
cc: devictree-disc...@lists.ozlabs.org
cc: linuxppc-dev@lists.ozlabs.org
cc: Grant Likely glik...@secretlab.ca
cc: Wolfgang Denk w...@denx.de
---
 .../devicetree/bindings/powerpc/fsl/mpc5200.txt|   16 +++
 arch/powerpc/platforms/52xx/mpc52xx_common.c   |   27 
 2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt 
b/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt
index 4ccb2cd..0c1c6c8 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt
@@ -155,6 +155,9 @@ Each GPIO controller node should have the empty property 
gpio-controller and
 according to the bit numbers in the GPIO control registers. The second cell
 is for flags which is currently unused.
 
+If firmware does not setup port_config correct, it can be modified
+through the fsl,init-port-config property in the fsl,mpc5200-gpio node.
+
 fsl,mpc5200-fec nodes
 -
 The FEC node can specify one of the following properties to configure
@@ -196,3 +199,16 @@ External interrupts:
 fsl,mpc5200-mscan nodes
 ---
 See file can.txt in this directory.
+
+fsl,mpc5200-cdm nodes
+-
+- setup CDM 48MHz Fractional Divider Configuration Register
+  If firmware does not setup this register correct, you can
+  modify it with the following properties:
+
+  - fsl,init-ext-48mhz-en
+see MPC5200BUM Table 5-11 Bits 0-7
+  - fsl,init-fd-enable
+see MPC5200BUM Table 5-11 Bits 8-15
+  - fsl,init-fd-counters
+see MPC5200BUM Table 5-11 Bits 16-31
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 41f3a7e..41099f3 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -136,6 +136,8 @@ void __init
 mpc52xx_map_common_devices(void)
 {
struct device_node *np;
+   const u32 *prop;
+   int plen;
 
/* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
 * possibly from a interrupt context. wdt is only implement
@@ -153,11 +155,36 @@ mpc52xx_map_common_devices(void)
/* Clock Distribution Module, used by PSC clock setting function */
np = of_find_matching_node(NULL, mpc52xx_cdm_ids);
mpc52xx_cdm = of_iomap(np, 0);
+   prop = of_get_property(np, fsl,init-ext-48mhz-en, plen);
+   if (prop) {
+   pr_debug(ext-48mhz-en: old:%x new:%x\n,
+   in_8(mpc52xx_cdm-ext_48mhz_en), *prop);
+   out_8(mpc52xx_cdm-ext_48mhz_en, *prop);
+   }
+   prop = of_get_property(np, fsl,init-fd-enable, plen);
+   if (prop) {
+   pr_debug(fd-enable: old:%x new:%x\n,
+   in_8(mpc52xx_cdm-fd_enable), *prop);
+   out_8(mpc52xx_cdm-fd_enable, *prop);
+   }
+   prop = of_get_property(np, fsl,init-fd-counters, plen);
+   if (prop) {
+   pr_debug(fd-counters: old:%x new:%x\n,
+   in_be16(mpc52xx_cdm-fd_counters), *prop);
+   out_be16(mpc52xx_cdm-fd_counters, *prop);
+   }
of_node_put(np);
 
/* simple_gpio registers */
np = of_find_matching_node(NULL, mpc52xx_gpio_simple);
simple_gpio = of_iomap(np, 0);
+   /* fixup the port_config register */
+   prop = of_get_property(np, fsl,init-port-config, plen);
+   if (prop) {
+   pr_info(port-config: old:%x new:%x\n,
+   in_be32(simple_gpio-port_config), *prop);
+   out_be32(simple_gpio-port_config, *prop);
+   }
of_node_put(np);
 
/* wkup_gpio registers */
-- 
1.7.4.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-22 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Thu, Mar 17, 2011 at 07:12:56AM +0100, Heiko Schocher wrote:
 Paul Mundt schrieb:
 On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious 
 style problems and is ready for submission.

  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 This patchset is pending know for a while. I got Acked by from

 Samuel Ortiz for the mfd part, see here:

 http://www.spinics.net/lists/linux-fbdev/msg02550.html
 http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

 and for the DTS part from Benjamin Herrenschmidt:

 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

 Are there some more issues?

 Not that I remember off the top of my head, but I think they've been lost
 in my backlog. Could you re-send the current series with the appropriate
 acked-bys? If there's nothing else obvious outstanding I'll roll them in.
 Ok, I resend them (I also rebase them to current tree, ok?)

 Ok, I've dug them up on l-k in the meantime and applied 1-3. 4/4 doesn't
 apply due to a missing dts file, but I assume you're aware of that and
 will take care of it separately. Let me know if I've overlooked anything,
 and sorry for the delay!

No problem!

Just working on this patchset (rebase and check if it boots/works) ... will
post the update (with all patches again) in some minutes, so please wait
for it.

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v6 6/6] powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.

2011-03-22 Thread Heiko Schocher
added:

CONFIG_MTD_OF_PARTS
CONFIG_MTD_PLATRAM
CONFIG_FIXED_PHY
CONFIG_SENSORS_LM80
CONFIG_MFD_SM501
CONFIG_FB
CONFIG_FB_FOREIGN_ENDIAN
CONFIG_FB_SM501
CONFIG_FRAMEBUFFER_CONSOLE
CONFIG_RTC_DRV_DS1374

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  added Grant Likely to cc
- changes for v6:
  - new in this version, therefore patch
powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.
removed.
As this board is tqm5200 based, added necessary changes
to the tqm5200_defconfig. In previous patchserie I added
the changes to mpc5200_defconfig, as Wolfram Sang mentioned,
but as tqm5200_defconfig is in mainline, and the board is
tqm5200 based, I think, thats the appropriate place, as
new defconfigs are not accepted. Paul, before applying
this patch series, this patch should get an Acked by
from a powerpc maintainer...
  - repost the complete patchserie as Paul Mundt suggested

 arch/powerpc/configs/52xx/tqm5200_defconfig |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig 
b/arch/powerpc/configs/52xx/tqm5200_defconfig
index 959cd2c..716a37b 100644
--- a/arch/powerpc/configs/52xx/tqm5200_defconfig
+++ b/arch/powerpc/configs/52xx/tqm5200_defconfig
@@ -1,9 +1,10 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_EXPERT=y
+CONFIG_EMBEDDED=y
 # CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_KALLSYMS is not set
 # CONFIG_EPOLL is not set
@@ -17,7 +18,6 @@ CONFIG_PPC_MPC5200_SIMPLE=y
 CONFIG_PPC_MPC5200_BUGFIX=y
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_BESTCOMM=y
-CONFIG_SPARSE_IRQ=y
 CONFIG_PM=y
 # CONFIG_PCI is not set
 CONFIG_NET=y
@@ -38,17 +38,18 @@ CONFIG_MTD=y
 CONFIG_MTD_CONCAT=y
 CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_OF_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_PLATRAM=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=32768
-# CONFIG_MISC_DEVICES is not set
 CONFIG_BLK_DEV_SD=y
 CONFIG_CHR_DEV_SG=y
 CONFIG_ATA=y
@@ -56,13 +57,11 @@ CONFIG_PATA_MPC52xx=y
 CONFIG_PATA_PLATFORM=y
 CONFIG_NETDEVICES=y
 CONFIG_LXT_PHY=y
+CONFIG_FIXED_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC_MPC52xx=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_1 is not set
-# CONFIG_INPUT is not set
-# CONFIG_SERIO is not set
-# CONFIG_VT is not set
 CONFIG_SERIAL_MPC52xx=y
 CONFIG_SERIAL_MPC52xx_CONSOLE=y
 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
@@ -70,7 +69,13 @@ CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MPC=y
+CONFIG_SENSORS_LM80=y
 CONFIG_WATCHDOG=y
+CONFIG_MFD_SM501=y
+CONFIG_FB=y
+CONFIG_FB_FOREIGN_ENDIAN=y
+CONFIG_FB_SM501=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DEVICE_CLASS is not set
@@ -80,10 +85,10 @@ CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
 CONFIG_USB_STORAGE=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_DS1374=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_PROC_KCORE=y
@@ -102,7 +107,6 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_CRYPTO_ECB=y
 CONFIG_CRYPTO_PCBC=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
-- 
1.7.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v6 0/6] powerpc, 52xx: add charon board support

2011-03-22 Thread Heiko Schocher
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org

changes since v5:
- repost complete patchseries, as Paul Mundt suggested
- rebased against current head
- add Acked-by from Samuel Ortiz (MFD parts)
  http://www.spinics.net/lists/linux-fbdev/msg02550.html
  http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

  and Benjamin Herrenschmidt (DTS parts)
  http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html
- removed patch 
  powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.
  therefore added
  powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.

  Paul: before adding this patchseries, this patch should get
an Acked-by from a powerpc maintainer. 

checkpatch says:
total: 0 errors, 0 warnings, 233 lines checked

20110322/0001-powerpc-5200-add-support-for-charon-board.patch has no obvious 
style problems and is ready for submission.
total: 0 errors, 0 warnings, 841 lines checked

20110322/0002-video-sm501-add-I-O-functions-for-use-on-powerpc.patch has no 
obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 109 lines checked

20110322/0003-video-sm501-add-edid-and-commandline-support.patch has no obvious 
style problems and is ready for submission.
total: 0 errors, 0 warnings, 106 lines checked

20110322/0004-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious 
style problems and is ready for submission.
total: 0 errors, 0 warnings, 22 lines checked

20110322/0005-powerpc-video-add-SM501-support-for-charon-board.patch has no 
obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 82 lines checked

20110322/0006-powerpc-tqm5200-update-tqm5200_defconfig-to-fit-for-.patch has no 
obvious style problems and is ready for submission.

Heiko Schocher (6):
  powerpc, 5200: add support for charon board
  video, sm501: add I/O functions for use on powerpc
  video, sm501: add edid and commandline support
  video, sm501: add OF binding to support SM501
  powerpc, video: add SM501 support for charon board.
  powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.

 Documentation/fb/sm501.txt   |   10 +
 Documentation/powerpc/dts-bindings/sm501.txt |   34 
 arch/powerpc/boot/dts/charon.dts |  236 ++
 arch/powerpc/configs/52xx/tqm5200_defconfig  |   20 ++-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 drivers/mfd/sm501.c  |  133 +++--
 drivers/video/sm501fb.c  |  272 +-
 include/linux/sm501.h|8 +
 8 files changed, 555 insertions(+), 159 deletions(-)
 create mode 100644 Documentation/fb/sm501.txt
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 create mode 100644 arch/powerpc/boot/dts/charon.dts

-- 
1.7.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v6 3/6] video, sm501: add edid and commandline support

2011-03-22 Thread Heiko Schocher
- add commandline options:
  sm501fb.mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501fb.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
- i/o routine patch
- edid support patch
- changes since v4:
  - add info-pdata = sm501fb_def_pdata; in sm501fb_probe()
as Paul Mundt suggested (and I wrongly deleted)
  - move kfree(info-edid_data); to patch 3/4
as edid_data is only allocated in the CONFIG_OF case
- changes for v6:
  - repost complete patchserie
  - rebased against current head

 Documentation/fb/sm501.txt |   10 +++
 drivers/video/sm501fb.c|   65 ---
 2 files changed, 70 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/fb/sm501.txt

diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
new file mode 100644
index 000..8d17aeb
--- /dev/null
+++ b/Documentation/fb/sm501.txt
@@ -0,0 +1,10 @@
+Configuration:
+
+You can pass the following kernel command line options to sm501 
videoframebuffer:
+
+   sm501fb.bpp=SM501 Display driver:
+   Specifiy bits-per-pixel if not specified by 'mode'
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 5df406c..f31252c 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -41,6 +41,26 @@
 #include linux/sm501.h
 #include linux/sm501-regs.h
 
+#include edid.h
+
+static char *fb_mode = 640x480-16@60;
+static unsigned long default_bpp = 16;
+
+static struct fb_videomode __devinitdata sm501_default_mode = {
+   .refresh= 60,
+   .xres   = 640,
+   .yres   = 480,
+   .pixclock   = 20833,
+   .left_margin= 142,
+   .right_margin   = 13,
+   .upper_margin   = 21,
+   .lower_margin   = 1,
+   .hsync_len  = 69,
+   .vsync_len  = 3,
+   .sync   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+   .vmode  = FB_VMODE_NONINTERLACED
+};
+
 #define NR_PALETTE 256
 
 enum sm501_controller {
@@ -77,6 +97,7 @@ struct sm501fb_info {
void __iomem*regs2d;/* 2d remapped registers */
void __iomem*fbmem; /* remapped framebuffer */
size_t   fbmem_len; /* length of remapped region */
+   u8 *edid_data;
 };
 
 /* per-framebuffer private data */
@@ -1725,9 +1746,16 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.vmode   = FB_VMODE_NONINTERLACED;
fb-var.bits_per_pixel  = 16;
 
+   if (info-edid_data) {
+   /* Now build modedb from EDID */
+   fb_edid_to_monspecs(info-edid_data, fb-monspecs);
+   fb_videomode_to_modelist(fb-monspecs.modedb,
+fb-monspecs.modedb_len,
+fb-modelist);
+   }
+
if (enable  (pd-flags  SM501FB_FLAG_USE_INIT_MODE)  0) {
/* TODO read the mode from the current display */
-
} else {
if (pd-def_mode) {
dev_info(info-dev, using supplied mode\n);
@@ -1737,12 +1765,34 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.xres_virtual = fb-var.xres;
fb-var.yres_virtual = fb-var.yres;
} else {
-   ret = fb_find_mode(fb-var, fb,
+   if (info-edid_data)
+   ret = fb_find_mode(fb-var, fb, fb_mode,
+   fb-monspecs.modedb,
+   fb-monspecs.modedb_len,
+   sm501_default_mode, default_bpp);
+   else

[PATCH v6 2/6] video, sm501: add I/O functions for use on powerpc

2011-03-22 Thread Heiko Schocher
- add read/write functions for using this driver
  also on powerpc plattforms

Signed-off-by: Heiko Schocher h...@denx.de
Acked-by: Samuel Ortiz sa...@linux.intel.com
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
- i/o routine patch
  - use ioread/write32{be} accessors instead of
__do_readl/__do_writel{_be}
- edid support patch
- changes for v6:
  - repost complete patchserie
  - rebased against current head

 drivers/mfd/sm501.c |  125 +-
 drivers/video/sm501fb.c |  172 --
 include/linux/sm501.h   |8 ++
 3 files changed, 161 insertions(+), 144 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 5de3a76..558d5f3 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -133,10 +133,10 @@ static unsigned long decode_div(unsigned long pll2, 
unsigned long val,
 
 static void sm501_dump_clk(struct sm501_devdata *sm)
 {
-   unsigned long misct = readl(sm-regs + SM501_MISC_TIMING);
-   unsigned long pm0 = readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
-   unsigned long pm1 = readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
-   unsigned long pmc = readl(sm-regs + SM501_POWER_MODE_CONTROL);
+   unsigned long misct = smc501_readl(sm-regs + SM501_MISC_TIMING);
+   unsigned long pm0 = smc501_readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
+   unsigned long pm1 = smc501_readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
+   unsigned long pmc = smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL);
unsigned long sdclk0, sdclk1;
unsigned long pll2 = 0;
 
@@ -193,29 +193,29 @@ static void sm501_dump_regs(struct sm501_devdata *sm)
void __iomem *regs = sm-regs;
 
dev_info(sm-dev, System Control   %08x\n,
-   readl(regs + SM501_SYSTEM_CONTROL));
+   smc501_readl(regs + SM501_SYSTEM_CONTROL));
dev_info(sm-dev, Misc Control %08x\n,
-   readl(regs + SM501_MISC_CONTROL));
+   smc501_readl(regs + SM501_MISC_CONTROL));
dev_info(sm-dev, GPIO Control Low %08x\n,
-   readl(regs + SM501_GPIO31_0_CONTROL));
+   smc501_readl(regs + SM501_GPIO31_0_CONTROL));
dev_info(sm-dev, GPIO Control Hi  %08x\n,
-   readl(regs + SM501_GPIO63_32_CONTROL));
+   smc501_readl(regs + SM501_GPIO63_32_CONTROL));
dev_info(sm-dev, DRAM Control %08x\n,
-   readl(regs + SM501_DRAM_CONTROL));
+   smc501_readl(regs + SM501_DRAM_CONTROL));
dev_info(sm-dev, Arbitration Ctrl %08x\n,
-   readl(regs + SM501_ARBTRTN_CONTROL));
+   smc501_readl(regs + SM501_ARBTRTN_CONTROL));
dev_info(sm-dev, Misc Timing  %08x\n,
-   readl(regs + SM501_MISC_TIMING));
+   smc501_readl(regs + SM501_MISC_TIMING));
 }
 
 static void sm501_dump_gate(struct sm501_devdata *sm)
 {
dev_info(sm-dev, CurrentGate  %08x\n,
-   readl(sm-regs + SM501_CURRENT_GATE));
+   smc501_readl(sm-regs + SM501_CURRENT_GATE));
dev_info(sm-dev, CurrentClock %08x\n,
-   readl(sm-regs + SM501_CURRENT_CLOCK));
+   smc501_readl(sm-regs + SM501_CURRENT_CLOCK));
dev_info(sm-dev, PowerModeControl %08x\n,
-   readl(sm-regs + SM501_POWER_MODE_CONTROL));
+   smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL));
 }
 
 #else
@@ -231,7 +231,7 @@ static inline void sm501_dump_clk(struct sm501_devdata *sm) 
{ }
 
 static void sm501_sync_regs(struct sm501_devdata *sm)
 {
-   readl(sm-regs);
+   smc501_readl(sm-regs);
 }
 
 static inline void sm501_mdelay(struct sm501_devdata *sm, unsigned int delay)
@@ -261,11 +261,11 @@ int sm501_misc_control(struct device *dev,
 
spin_lock_irqsave(sm-reg_lock, save);
 
-   misc = readl(sm-regs + SM501_MISC_CONTROL);
+   misc = smc501_readl(sm-regs + SM501_MISC_CONTROL);
to = (misc  ~clear) | set;
 
if (to != misc) {
-   writel(to, sm-regs + SM501_MISC_CONTROL

[PATCH v6 5/6] powerpc, video: add SM501 support for charon board.

2011-03-22 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  - no board specific defconfig file for mpc52xx based boards as suggested
from Wolfram Sang

- changes since v2:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz and lkml to cc, as
  suggested from Paul Mundt.

- changes since v3:
  - rebased against v2.6.38-rc2
- changes since v4:
  - added Paul Mundt to cc (Sorry forgot this in series v4)

 arch/powerpc/boot/dts/charon.dts |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 9776889..0e00e50 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -186,6 +186,7 @@
#address-cells = 2;
#size-cells = 1;
ranges =   0 0 0xfc00 0x0200
+   1 0 0xe000 0x0400 // CS1 range, SM501
3 0 0xe800 0x0008;
 
flash@0,0 {
@@ -197,6 +198,15 @@
#address-cells = 1;
};
 
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   mode = 640x480-32@60;
+   interrupts = 1 1 3;
+   little-endian;
+   };
+
mram0@3,0 {
compatible = mtd-ram;
reg = 3 0x0 0x8;
-- 
1.7.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v6 4/6] video, sm501: add OF binding to support SM501

2011-03-22 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

Signed-off-by: Heiko Schocher h...@denx.de
Acked-by: Samuel Ortiz sa...@linux.intel.com
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
  - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
hide this in DTS, as Paul suggested.
- i/o routine patch
- edid support patch
- changes since v4
  replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
  it is no longer MPC52xx only.
- changes since v5
  free edid_data after its usage, as it is no longer needed,
  suggested from Paul Mundt. Also fall back to default if
  kmemdup(edid_data) fails.
- changes for v6:
  - repost complete patchserie
  - rebased against current head

 Documentation/powerpc/dts-bindings/sm501.txt |   34 +
 drivers/mfd/sm501.c  |8 +-
 drivers/video/sm501fb.c  |   35 +-
 3 files changed, 75 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..7d319fb
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,34 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+- little-endian: availiable on big endian systems, to
+  set different foreign endian.
+- big-endian: availiable on little endian systems, to
+  set different foreign endian.
+
+Example for MPC5200:
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480-32@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 558d5f3..574f696 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1377,7 +1377,7 @@ static int __devinit sm501_init_dev(struct sm501_devdata 
*sm)
sm501_register_gpio(sm);
}
 
-   if (pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
+   if (pdata  pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
if (!sm501_gpio_isregistered(sm))
dev_err(sm-dev, no gpio available for i2c gpio.\n);
else
@@ -1735,10 +1735,16 @@ static struct pci_driver sm501_pci_driver = {
 
 MODULE_ALIAS(platform:sm501);
 
+static struct of_device_id __devinitdata of_sm501_match_tbl[] = {
+   { .compatible = smi,sm501, },
+   { /* end */ }
+};
+
 static struct platform_driver sm501_plat_driver = {
.driver = {
.name   = sm501,
.owner  = THIS_MODULE,
+   .of_match_table = of_sm501_match_tbl,
},
.probe  = sm501_plat_probe,
.remove = sm501_plat_remove,
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index f31252c..f275385 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1729,6 +1729,15 @@ static int sm501fb_init_fb(struct fb_info *fb,
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
 
+#if defined(CONFIG_OF)
+#ifdef __BIG_ENDIAN
+   if (of_get_property(info-dev-parent-of_node, little-endian, NULL))
+   fb-flags |= FBINFO_FOREIGN_ENDIAN;
+#else
+   if (of_get_property(info-dev-parent-of_node, big-endian, NULL))
+   fb-flags |= FBINFO_FOREIGN_ENDIAN;
+#endif
+#endif
/* fixed data */
 
fb

[PATCH v1 1/6] powerpc, 5200: add support for charon board

2011-03-22 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: Wolfram Sang w.s...@pengutronix.de
cc: Grant Likely grant.lik...@secretlab.ca
cc: Benjamin Herrenschmidt b...@kernel.crashing.org
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Wolfgang Denk w...@denx.de
cc: Paul Mundt let...@linux-sh.org
---
- changes since v1:
  add comments from Wolfram Sang
  - no defconfig file
  - comment corrected in DTS
  - boardlist sorted alphabetically
  - commit log without boardinfo
- changes for v6:
  - rebased against current head
  - repost complete patchserie
  - added Acked-by from Benjamin Herrenschmidt

 arch/powerpc/boot/dts/charon.dts |  226 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 227 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/charon.dts

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
new file mode 100644
index 000..9776889
--- /dev/null
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -0,0 +1,226 @@
+/*
+ * charon board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz m...@semihalf.com
+ *
+ * Copyright (C) 2010 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = anon,charon;
+   compatible = anon,charon;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5200@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0800;  // 128MB
+   };
+
+   soc5200@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   cdm@200 {
+   compatible = fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-controller@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   };
+
+   timer@600 { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   fsl,has-wdt;
+   };
+
+   can@900 {
+   compatible = fsl,mpc5200-mscan;
+   interrupts = 2 17 0;
+   reg = 0x900 0x80;
+   };
+
+   can@980 {
+   compatible = fsl,mpc5200-mscan;
+   interrupts = 2 18 0;
+   reg = 0x980 0x80;
+   };
+
+   gpio_simple: gpio@b00 {
+   compatible = fsl,mpc5200-gpio;
+   reg = 0xb00 0x40;
+   interrupts = 1 7 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   usb@1000 {
+   compatible = fsl,mpc5200-ohci,ohci-be;
+   reg = 0x1000 0xff;
+   interrupts = 2 6 0;
+   };
+
+   dma-controller@1200 {
+   device_type = dma-controller;
+   compatible = fsl,mpc5200-bestcomm;
+   reg = 0x1200 0x80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0

Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-17 Thread Heiko Schocher
Hello Paul,

Paul Mundt schrieb:
 On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
 problems and is ready for submission.

  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 This patchset is pending know for a while. I got Acked by from

 Samuel Ortiz for the mfd part, see here:

 http://www.spinics.net/lists/linux-fbdev/msg02550.html
 http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

 and for the DTS part from Benjamin Herrenschmidt:

 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

 Are there some more issues?

 Not that I remember off the top of my head, but I think they've been lost
 in my backlog. Could you re-send the current series with the appropriate
 acked-bys? If there's nothing else obvious outstanding I'll roll them in.

Ok, I resend them (I also rebase them to current tree, ok?)

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-15 Thread Heiko Schocher
Hello

Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501
 
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: linux-fb...@vger.kernel.org
 cc: devicetree-disc...@ozlabs.org
 cc: Ben Dooks b...@simtec.co.uk
 cc: Vincent Sanders vi...@simtec.co.uk
 cc: Samuel Ortiz sa...@linux.intel.com
 cc: linux-ker...@vger.kernel.org
 cc: Randy Dunlap rdun...@xenotime.net
 cc: Paul Mundt let...@linux-sh.org
 
 ---
 - changes since v1:
   add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
   Paul Mundt.
 - changes since v2:
   add comments from Randy Dunlap:
   - move parameter documentation to Documentation/fb/sm501.txt
 - changes since v3:
   - rebased against v2.6.38-rc2
   - split in 3 patches
 - of support patch
   - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
 hide this in DTS, as Paul suggested.
 - i/o routine patch
 - edid support patch
 - changes since v4
   replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
   it is no longer MPC52xx only.
 - changes since v5
   free edid_data after its usage, as it is no longer needed,
   suggested from Paul Mundt. Also fall back to default if
   kmemdup(edid_data) fails.
 
 ./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
 total: 0 errors, 0 warnings, 132 lines checked
 
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
 problems and is ready for submission.
 
  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

This patchset is pending know for a while. I got Acked by from

Samuel Ortiz for the mfd part, see here:

http://www.spinics.net/lists/linux-fbdev/msg02550.html
http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

and for the DTS part from Benjamin Herrenschmidt:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

Are there some more issues?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v4] video, sm501: add OF binding to support SM501

2011-01-25 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Tue, Jan 25, 2011 at 08:20:31AM +0100, Heiko Schocher wrote:
 @@ -1934,7 +1943,29 @@ static int __devinit sm501fb_probe(struct 
 platform_device *pdev)
  }
  
  if (info-pdata == NULL) {
 -dev_info(dev, using default configuration data\n);
 +int found = 0;
 +#if defined(CONFIG_OF)
 +struct device_node *np = pdev-dev.parent-of_node;
 +const u8 *prop;
 +const char *cp;
 +int len;
 +
 +info-pdata = sm501fb_def_pdata;
 +if (np) {
 +/* Get EDID */
 +cp = of_get_property(np, mode, len);
 +if (cp)
 +strcpy(fb_mode, cp);
 +prop = of_get_property(np, edid, len);
 +if (prop  len == EDID_LENGTH) {
 +info-edid_data = kmemdup(prop, EDID_LENGTH,
 +  GFP_KERNEL);
 +found = 1;
 +}
 +}
 +#endif
 +if (!found)
 +dev_info(dev, using default configuration data\n);
  }
  
  /* probe for the presence of each panel */
 
 Starting to get a bit pedantic.. but kmemdup() tries to do a kmalloc(),

No problem!

 and so can fail. Your other patches handle the info-edid_data == NULL
 case, in addition to the kfree(), but you're probably going to want to
 chomp that found assignment incase of the allocation failing and falling
 back on the default mode.
 
 You also don't really have any need to keep the EDID block around after
 probe as far as I can tell, so you should be able to rework this in to
 something more like:
 
   info-edid_data = kmemdup(..);
   ...
   if (info-edid_data) {
   fb_edid_to_monspecs(..);
   kfree(info-edid_data);
   fb_videomode_to_modelist(..);
   }
 
   ...

Ok, rework this part, thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/4 v4] video, sm501: add edid and commandline support

2011-01-25 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Mon, Jan 24, 2011 at 10:57:27AM +0100, Heiko Schocher wrote:
 @@ -1884,7 +1935,6 @@ static int __devinit sm501fb_probe(struct 
 platform_device *pdev)
  
  if (info-pdata == NULL) {
  dev_info(dev, using default configuration data\n);
 -info-pdata = sm501fb_def_pdata;
  }
  
  /* probe for the presence of each panel */
 
 I assume this is accidental? I don't see how you're compensating for this
 in any of the other patches at least, as it's orthogonal from the default
 mode settings.

Seems so, rework this too, thanks!

bye,
heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/4 v5] video, sm501: add edid and commandline support

2011-01-25 Thread Heiko Schocher
- add commandline options:
  sm501fb.mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501fb.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
- i/o routine patch
- edid support patch
- changes since v4:
  - add info-pdata = sm501fb_def_pdata; in sm501fb_probe()
as Paul Mundt suggested (and I wrongly deleted)
  - move kfree(info-edid_data); to patch 3/4
as edid_data is only allocated in the CONFIG_OF case

./scripts/checkpatch.pl 0002-video-sm501-add-edid-and-commandline-support.patch
total: 0 errors, 0 warnings, 109 lines checked

0002-video-sm501-add-edid-and-commandline-support.patch has no obvious style 
problems and is ready for submission.

 Documentation/fb/sm501.txt |   10 +++
 drivers/video/sm501fb.c|   65 ---
 2 files changed, 70 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/fb/sm501.txt

diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
new file mode 100644
index 000..8d17aeb
--- /dev/null
+++ b/Documentation/fb/sm501.txt
@@ -0,0 +1,10 @@
+Configuration:
+
+You can pass the following kernel command line options to sm501 
videoframebuffer:
+
+   sm501fb.bpp=SM501 Display driver:
+   Specifiy bits-per-pixel if not specified by 'mode'
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index c5b4b95..d60b2a2 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -41,6 +41,26 @@
 #include linux/sm501.h
 #include linux/sm501-regs.h
 
+#include edid.h
+
+static char *fb_mode = 640x480-16@60;
+static unsigned long default_bpp = 16;
+
+static struct fb_videomode __devinitdata sm501_default_mode = {
+   .refresh= 60,
+   .xres   = 640,
+   .yres   = 480,
+   .pixclock   = 20833,
+   .left_margin= 142,
+   .right_margin   = 13,
+   .upper_margin   = 21,
+   .lower_margin   = 1,
+   .hsync_len  = 69,
+   .vsync_len  = 3,
+   .sync   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+   .vmode  = FB_VMODE_NONINTERLACED
+};
+
 #define NR_PALETTE 256
 
 enum sm501_controller {
@@ -77,6 +97,7 @@ struct sm501fb_info {
void __iomem*regs2d;/* 2d remapped registers */
void __iomem*fbmem; /* remapped framebuffer */
size_t   fbmem_len; /* length of remapped region */
+   u8 *edid_data;
 };
 
 /* per-framebuffer private data */
@@ -1725,9 +1746,16 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.vmode   = FB_VMODE_NONINTERLACED;
fb-var.bits_per_pixel  = 16;
 
+   if (info-edid_data) {
+   /* Now build modedb from EDID */
+   fb_edid_to_monspecs(info-edid_data, fb-monspecs);
+   fb_videomode_to_modelist(fb-monspecs.modedb,
+fb-monspecs.modedb_len,
+fb-modelist);
+   }
+
if (enable  (pd-flags  SM501FB_FLAG_USE_INIT_MODE)  0) {
/* TODO read the mode from the current display */
-
} else {
if (pd-def_mode) {
dev_info(info-dev, using supplied mode\n);
@@ -1737,12 +1765,34 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.xres_virtual = fb-var.xres;
fb-var.yres_virtual = fb-var.yres;
} else {
-   ret = fb_find_mode(fb-var, fb,
+   if (info-edid_data)
+   ret = fb_find_mode(fb-var, fb, fb_mode,
+   fb-monspecs.modedb,
+   fb-monspecs.modedb_len,
+   sm501_default_mode, default_bpp);
+   else

[PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-01-25 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
  - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
hide this in DTS, as Paul suggested.
- i/o routine patch
- edid support patch
- changes since v4
  replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
  it is no longer MPC52xx only.
- changes since v5
  free edid_data after its usage, as it is no longer needed,
  suggested from Paul Mundt. Also fall back to default if
  kmemdup(edid_data) fails.

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
total: 0 errors, 0 warnings, 132 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.

 Documentation/powerpc/dts-bindings/sm501.txt |   34 +
 drivers/mfd/sm501.c  |9 +-
 drivers/video/sm501fb.c  |   42 --
 3 files changed, 81 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..7d319fb
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,34 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+- little-endian: availiable on big endian systems, to
+  set different foreign endian.
+- big-endian: availiable on little endian systems, to
+  set different foreign endian.
+
+Example for MPC5200:
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480-32@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 558d5f3..df3702c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1377,7 +1377,7 @@ static int __devinit sm501_init_dev(struct sm501_devdata 
*sm)
sm501_register_gpio(sm);
}
 
-   if (pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
+   if (pdata  pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
if (!sm501_gpio_isregistered(sm))
dev_err(sm-dev, no gpio available for i2c gpio.\n);
else
@@ -1422,6 +1422,7 @@ static int __devinit sm501_plat_probe(struct 
platform_device *dev)
 
sm-io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
sm-mem_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+
if (sm-io_res == NULL || sm-mem_res == NULL) {
dev_err(dev-dev, failed to get IO resource\n);
ret = -ENOENT;
@@ -1735,10 +1736,16 @@ static struct pci_driver sm501_pci_driver = {
 
 MODULE_ALIAS(platform:sm501);
 
+static struct of_device_id __devinitdata of_sm501_match_tbl[] = {
+   { .compatible = smi,sm501, },
+   { /* end */ }
+};
+
 static struct platform_driver sm501_plat_driver = {
.driver = {
.name   = sm501,
.owner  = THIS_MODULE,
+   .of_match_table = of_sm501_match_tbl,
},
.probe  = sm501_plat_probe,
.remove = sm501_plat_remove,
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index d60b2a2..92b001d 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1729,6 +1729,15 @@ static int sm501fb_init_fb(struct fb_info *fb,
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
 
+#if defined(CONFIG_OF

[PATCH 1/4 v4] video, sm501: add I/O functions for use on powerpc

2011-01-24 Thread Heiko Schocher
- add read/write functions for using this driver
  also on powerpc plattforms

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
- i/o routine patch
  - use ioread/write32{be} accessors instead of
__do_readl/__do_writel{_be}
- edid support patch

./scripts/checkpatch.pl 
0001-video-sm501-add-I-O-functions-for-use-on-powerpc.patch
total: 0 errors, 0 warnings, 841 lines checked

0001-video-sm501-add-I-O-functions-for-use-on-powerpc.patch has no obvious 
style problems and is ready for submission.

 drivers/mfd/sm501.c |  125 +-
 drivers/video/sm501fb.c |  172 --
 include/linux/sm501.h   |8 ++
 3 files changed, 161 insertions(+), 144 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 5de3a76..558d5f3 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -133,10 +133,10 @@ static unsigned long decode_div(unsigned long pll2, 
unsigned long val,
 
 static void sm501_dump_clk(struct sm501_devdata *sm)
 {
-   unsigned long misct = readl(sm-regs + SM501_MISC_TIMING);
-   unsigned long pm0 = readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
-   unsigned long pm1 = readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
-   unsigned long pmc = readl(sm-regs + SM501_POWER_MODE_CONTROL);
+   unsigned long misct = smc501_readl(sm-regs + SM501_MISC_TIMING);
+   unsigned long pm0 = smc501_readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
+   unsigned long pm1 = smc501_readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
+   unsigned long pmc = smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL);
unsigned long sdclk0, sdclk1;
unsigned long pll2 = 0;
 
@@ -193,29 +193,29 @@ static void sm501_dump_regs(struct sm501_devdata *sm)
void __iomem *regs = sm-regs;
 
dev_info(sm-dev, System Control   %08x\n,
-   readl(regs + SM501_SYSTEM_CONTROL));
+   smc501_readl(regs + SM501_SYSTEM_CONTROL));
dev_info(sm-dev, Misc Control %08x\n,
-   readl(regs + SM501_MISC_CONTROL));
+   smc501_readl(regs + SM501_MISC_CONTROL));
dev_info(sm-dev, GPIO Control Low %08x\n,
-   readl(regs + SM501_GPIO31_0_CONTROL));
+   smc501_readl(regs + SM501_GPIO31_0_CONTROL));
dev_info(sm-dev, GPIO Control Hi  %08x\n,
-   readl(regs + SM501_GPIO63_32_CONTROL));
+   smc501_readl(regs + SM501_GPIO63_32_CONTROL));
dev_info(sm-dev, DRAM Control %08x\n,
-   readl(regs + SM501_DRAM_CONTROL));
+   smc501_readl(regs + SM501_DRAM_CONTROL));
dev_info(sm-dev, Arbitration Ctrl %08x\n,
-   readl(regs + SM501_ARBTRTN_CONTROL));
+   smc501_readl(regs + SM501_ARBTRTN_CONTROL));
dev_info(sm-dev, Misc Timing  %08x\n,
-   readl(regs + SM501_MISC_TIMING));
+   smc501_readl(regs + SM501_MISC_TIMING));
 }
 
 static void sm501_dump_gate(struct sm501_devdata *sm)
 {
dev_info(sm-dev, CurrentGate  %08x\n,
-   readl(sm-regs + SM501_CURRENT_GATE));
+   smc501_readl(sm-regs + SM501_CURRENT_GATE));
dev_info(sm-dev, CurrentClock %08x\n,
-   readl(sm-regs + SM501_CURRENT_CLOCK));
+   smc501_readl(sm-regs + SM501_CURRENT_CLOCK));
dev_info(sm-dev, PowerModeControl %08x\n,
-   readl(sm-regs + SM501_POWER_MODE_CONTROL));
+   smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL));
 }
 
 #else
@@ -231,7 +231,7 @@ static inline void sm501_dump_clk(struct sm501_devdata *sm) 
{ }
 
 static void sm501_sync_regs(struct sm501_devdata *sm)
 {
-   readl(sm-regs);
+   smc501_readl(sm-regs);
 }
 
 static inline void sm501_mdelay(struct sm501_devdata *sm, unsigned int delay)
@@ -261,11 +261,11 @@ int sm501_misc_control(struct device *dev,
 
spin_lock_irqsave(sm-reg_lock, save);
 
-   misc = readl(sm-regs + SM501_MISC_CONTROL);
+   misc = smc501_readl(sm-regs + SM501_MISC_CONTROL);
to = (misc  ~clear) | set;
 
if (to != misc) {
-   writel(to, sm-regs + SM501_MISC_CONTROL);
+   smc501_writel(to, sm-regs

[PATCH 2/4 v4] video, sm501: add edid and commandline support

2011-01-24 Thread Heiko Schocher
- add commandline options:
  sm501fb.mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501fb.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
- i/o routine patch
- edid support patch

./scripts/checkpatch.pl 0002-video-sm501-add-edid-and-commandline-support.patch
total: 0 errors, 0 warnings, 123 lines checked

0002-video-sm501-add-edid-and-commandline-support.patch has no obvious style 
problems and is ready for submission.

 Documentation/fb/sm501.txt |   10 ++
 drivers/video/sm501fb.c|   67 
 2 files changed, 71 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/fb/sm501.txt

diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
new file mode 100644
index 000..8d17aeb
--- /dev/null
+++ b/Documentation/fb/sm501.txt
@@ -0,0 +1,10 @@
+Configuration:
+
+You can pass the following kernel command line options to sm501 
videoframebuffer:
+
+   sm501fb.bpp=SM501 Display driver:
+   Specifiy bits-per-pixel if not specified by 'mode'
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index c5b4b95..30b53ae 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -41,6 +41,26 @@
 #include linux/sm501.h
 #include linux/sm501-regs.h
 
+#include edid.h
+
+static char *fb_mode = 640x480-16@60;
+static unsigned long default_bpp = 16;
+
+static struct fb_videomode __devinitdata sm501_default_mode = {
+   .refresh= 60,
+   .xres   = 640,
+   .yres   = 480,
+   .pixclock   = 20833,
+   .left_margin= 142,
+   .right_margin   = 13,
+   .upper_margin   = 21,
+   .lower_margin   = 1,
+   .hsync_len  = 69,
+   .vsync_len  = 3,
+   .sync   = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+   .vmode  = FB_VMODE_NONINTERLACED
+};
+
 #define NR_PALETTE 256
 
 enum sm501_controller {
@@ -77,6 +97,7 @@ struct sm501fb_info {
void __iomem*regs2d;/* 2d remapped registers */
void __iomem*fbmem; /* remapped framebuffer */
size_t   fbmem_len; /* length of remapped region */
+   u8 *edid_data;
 };
 
 /* per-framebuffer private data */
@@ -1725,9 +1746,16 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.vmode   = FB_VMODE_NONINTERLACED;
fb-var.bits_per_pixel  = 16;
 
+   if (info-edid_data) {
+   /* Now build modedb from EDID */
+   fb_edid_to_monspecs(info-edid_data, fb-monspecs);
+   fb_videomode_to_modelist(fb-monspecs.modedb,
+fb-monspecs.modedb_len,
+fb-modelist);
+   }
+
if (enable  (pd-flags  SM501FB_FLAG_USE_INIT_MODE)  0) {
/* TODO read the mode from the current display */
-
} else {
if (pd-def_mode) {
dev_info(info-dev, using supplied mode\n);
@@ -1737,12 +1765,34 @@ static int sm501fb_init_fb(struct fb_info *fb,
fb-var.xres_virtual = fb-var.xres;
fb-var.yres_virtual = fb-var.yres;
} else {
-   ret = fb_find_mode(fb-var, fb,
+   if (info-edid_data)
+   ret = fb_find_mode(fb-var, fb, fb_mode,
+   fb-monspecs.modedb,
+   fb-monspecs.modedb_len,
+   sm501_default_mode, default_bpp);
+   else
+   ret = fb_find_mode(fb-var, fb,
   NULL, NULL, 0, NULL, 8);
 
-   if (ret == 0 || ret == 4) {
-   dev_err(info-dev

[PATCH 3/4 v4] video, sm501: add OF binding to support SM501

2011-01-24 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
  - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
hide this in DTS, as Paul suggested.
- i/o routine patch
- edid support patch

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
total: 0 errors, 0 warnings, 117 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.
 Documentation/powerpc/dts-bindings/sm501.txt |   34 ++
 drivers/mfd/sm501.c  |   16 +++-
 drivers/video/sm501fb.c  |   33 -
 3 files changed, 81 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..7d319fb
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,34 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+- little-endian: availiable on big endian systems, to
+  set different foreign endian.
+- big-endian: availiable on little endian systems, to
+  set different foreign endian.
+
+Example for MPC5200:
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480-32@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 558d5f3..5b7a8f4 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1377,7 +1377,7 @@ static int __devinit sm501_init_dev(struct sm501_devdata 
*sm)
sm501_register_gpio(sm);
}
 
-   if (pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
+   if (pdata  pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
if (!sm501_gpio_isregistered(sm))
dev_err(sm-dev, no gpio available for i2c gpio.\n);
else
@@ -1422,6 +1422,14 @@ static int __devinit sm501_plat_probe(struct 
platform_device *dev)
 
sm-io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
sm-mem_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+
+   if (sm-mem_res)
+   pr_debug(sm501 mem 0x%lx, 0x%lx\n,
+sm-mem_res-start, sm-mem_res-end);
+   if (sm-io_res)
+   pr_debug(sm501 io 0x%lx, 0x%lx\n,
+sm-io_res-start, sm-io_res-end);
+
if (sm-io_res == NULL || sm-mem_res == NULL) {
dev_err(dev-dev, failed to get IO resource\n);
ret = -ENOENT;
@@ -1735,10 +1743,16 @@ static struct pci_driver sm501_pci_driver = {
 
 MODULE_ALIAS(platform:sm501);
 
+static struct of_device_id __devinitdata of_sm501_match_tbl[] = {
+   { .compatible = smi,sm501, },
+   { /* end */ }
+};
+
 static struct platform_driver sm501_plat_driver = {
.driver = {
.name   = sm501,
.owner  = THIS_MODULE,
+   .of_match_table = of_sm501_match_tbl,
},
.probe  = sm501_plat_probe,
.remove = sm501_plat_remove,
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 30b53ae..2ae57aa 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1729,6 +1729,15 @@ static int sm501fb_init_fb(struct fb_info *fb,
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
 
+#if defined

[PATCH 4/4 v4] powerpc, video: add SM501 support for charon board.

2011-01-24 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org

---
- changes since v1:
  - no board specific defconfig file for mpc52xx based boards as suggested
from Wolfram Sang

- changes since v2:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz and lkml to cc, as
  suggested from Paul Mundt.

- changes since v3:
  - rebased against v2.6.38-rc2

./scripts/checkpatch.pl 
0004-powerpc-video-add-SM501-support-for-charon-board.patch
total: 0 errors, 0 warnings, 22 lines checked

0004-powerpc-video-add-SM501-support-for-charon-board.patch has no obvious 
style problems and is ready for submission.

 arch/powerpc/boot/dts/charon.dts |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 9776889..0e00e50 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -186,6 +186,7 @@
#address-cells = 2;
#size-cells = 1;
ranges =   0 0 0xfc00 0x0200
+   1 0 0xe000 0x0400 // CS1 range, SM501
3 0 0xe800 0x0008;
 
flash@0,0 {
@@ -197,6 +198,15 @@
#address-cells = 1;
};
 
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   mode = 640x480-32@60;
+   interrupts = 1 1 3;
+   little-endian;
+   };
+
mram0@3,0 {
compatible = mtd-ram;
reg = 3 0x0 0x8;
-- 
1.7.3.4

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 4/4 v5] powerpc, video: add SM501 support for charon board.

2011-01-24 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Tue, Jan 25, 2011 at 07:45:46AM +0100, Heiko Schocher wrote:
 @@ -197,6 +198,15 @@
  #address-cells = 1;
  };
  
 +display@1,0 {
 +compatible = smi,sm501;
 +reg = 1 0x 0x0080
 +   1 0x03e0 0x0020;
 +mode = 640x480-32@60;
 +interrupts = 1 1 3;
 +little-endian;
 +};
 +
 
 The endian designation looks good, but it still doesn't explain why you
 have a remaining CONFIG_PPC_MPC52xx ifdef encapsulating the property
 check in the sm501fb patch. It shouldn't be needed at all. If the
 platform supports OF then the property will need to be set one way or the
 other, so there is no need for any board or CPU ifdeffery within the
 driver itself.

Argh, of course you are right, thanks! I post an update for the
sm501fb of support patch.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 3/4 v4] video, sm501: add OF binding to support SM501

2011-01-24 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
  - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
hide this in DTS, as Paul suggested.
- i/o routine patch
- edid support patch
- changes since v4
  replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
  it is no longer MPC52xx only.

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
total: 0 errors, 0 warnings, 117 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.

 Documentation/powerpc/dts-bindings/sm501.txt |   34 ++
 drivers/mfd/sm501.c  |   16 +++-
 drivers/video/sm501fb.c  |   33 -
 3 files changed, 81 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..7d319fb
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,34 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+- little-endian: availiable on big endian systems, to
+  set different foreign endian.
+- big-endian: availiable on little endian systems, to
+  set different foreign endian.
+
+Example for MPC5200:
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480-32@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 558d5f3..5b7a8f4 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1377,7 +1377,7 @@ static int __devinit sm501_init_dev(struct sm501_devdata 
*sm)
sm501_register_gpio(sm);
}
 
-   if (pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
+   if (pdata  pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
if (!sm501_gpio_isregistered(sm))
dev_err(sm-dev, no gpio available for i2c gpio.\n);
else
@@ -1422,6 +1422,14 @@ static int __devinit sm501_plat_probe(struct 
platform_device *dev)
 
sm-io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
sm-mem_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+
+   if (sm-mem_res)
+   pr_debug(sm501 mem 0x%lx, 0x%lx\n,
+sm-mem_res-start, sm-mem_res-end);
+   if (sm-io_res)
+   pr_debug(sm501 io 0x%lx, 0x%lx\n,
+sm-io_res-start, sm-io_res-end);
+
if (sm-io_res == NULL || sm-mem_res == NULL) {
dev_err(dev-dev, failed to get IO resource\n);
ret = -ENOENT;
@@ -1735,10 +1743,16 @@ static struct pci_driver sm501_pci_driver = {
 
 MODULE_ALIAS(platform:sm501);
 
+static struct of_device_id __devinitdata of_sm501_match_tbl[] = {
+   { .compatible = smi,sm501, },
+   { /* end */ }
+};
+
 static struct platform_driver sm501_plat_driver = {
.driver = {
.name   = sm501,
.owner  = THIS_MODULE,
+   .of_match_table = of_sm501_match_tbl,
},
.probe  = sm501_plat_probe,
.remove = sm501_plat_remove,
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 30b53ae..bbdb359 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1729,6 +1729,15 @@ static int sm501fb_init_fb(struct fb_info *fb,
FBINFO_HWACCEL_COPYAREA

Re: mpc880 linux-2.6.32 slow running processes

2011-01-20 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
 Sent by: linuxppc-dev-bounces+joakim.tjernlund=transmode...@lists.ozlabs.org

 Rafael Beims rbe...@gmail.com wrote on 2011/01/10 17:35:38:
 Once you have tested it and it works, please send a patch to remove the 
 8xx workaround.
 Make sure Scott is cc:ed


 I tested linux-2.6.33 on my ppc880 board today, and even without the
 slowdown.patch applied, the board runs processes with good
 performance.
 It really seems that the problem is solved from linux-2.6.33 on.

 I'm not sure what you mean by sending a patch to remove the
 workaround. The only thing that I did in the 2.6.32 version was to
 apply the slowdown.patch attached in the message from Michael.

 Could you clarify please?
 Yes, this part in arch/powerpc/mm/pgtable.c:
 #ifdef CONFIG_8xx
  /* On 8xx, cache control instructions (particularly
   * dcbst from flush_dcache_icache) fault as write
   * operation if there is an unpopulated TLB entry
   * for the address in question. To workaround that,
   * we invalidate the TLB here, thus avoiding dcbst
   * misbehaviour.
   */
  /* 8xx doesn't care about PID, size or ind args */
  _tlbil_va(addr, 0, 0, 0);
 #endif /* CONFIG_8xx */

 Should be removed in = 2.6.33 kernels.
 My 8xx TLB work fixes this problem more efficiently.
 
 Can you test these 2 patches on recent 2.6 linux:
From 9024200169bf86b4f34cb3b1ebf68e0056237bc0 Mon Sep 17 00:00:00 2001
 From: Joakim Tjernlund joakim.tjernl...@transmode.se
 Date: Tue, 11 Jan 2011 13:43:42 +0100
 Subject: [PATCH 1/2] powerpc: Move 8xx invalidation of non present TLBs
[...]
 and
 
From 0ef93601290a75b087495dddeee6062a870f1dc6 Mon Sep 17 00:00:00 2001
 From: Joakim Tjernlund joakim.tjernl...@transmode.se
 Date: Tue, 11 Jan 2011 13:55:22 +0100
 Subject: [PATCH 2/2] powerpc: Remove 8xx redundant dcbst workaround.

Tested this on a board similliar to the mainline tqm8xx board with
lmbench:

-bash-3.2# cat /proc/cpuinfo
processor   : 0
cpu : 8xx
clock   : 80.00MHz
revision: 0.0 (pvr 0050 )
bogomips: 10.00
timebase: 500
platform: KUP4K
model   : KUP4K
Memory  : 96 MB
-bash-3.2#

-bash-3.2# cat /proc/version
Linux version 2.6.34-00064-g3e81b6b (h...@pollux.denx.de) (gcc version 4.2.2) 
#89 Thu Jan 20 08:39:52 CET 2011
-bash-3.2#

(First run of lmbench without your 2 patches, the two other runs with it)

-bash-3.2# make see
cd results  make summary summary.out 2summary.errs
cd results  make percent percent.out 2percent.errs
-bash-3.2# cat results/summary.out
make[1]: Entering directory `/home/hs/lmbench-3.0-a9/results'

 L M B E N C H  3 . 0   S U M M A R Y
 
 (Alpha software, do not distribute)

Basic system parameters
--
Host OS Description  Mhz  tlb  cache  mem   scal
 pages line   par   load
   bytes
- - ---  - - -- 
kup4k Linux 2.6.34-   powerpc-linux-gnu   792816 1.14001
kup4k Linux 2.6.34-   powerpc-linux-gnu   792816 1.02001
kup4k Linux 2.6.34-   powerpc-linux-gnu   792816 1.10001

Processor, Processes - times in microseconds - smaller is better
--
Host OS  Mhz null null  open slct sig  sig  fork exec sh
 call  I/O stat clos TCP  inst hndl proc proc proc
- -           
kup4k Linux 2.6.34-   79 2.58 12.3 126. 1285 353. 22.8 149. 8418 34.K 101K
kup4k Linux 2.6.34-   79 2.59 13.1 127. 1273 320. 23.4 127. 8251 33.K 100K
kup4k Linux 2.6.34-   79 2.47 13.1 127. 1288 315. 23.6 128. 8413 34.K 101K

Basic integer operations - times in nanoseconds - smaller is better
---
Host OS  intgr intgr  intgr  intgr  intgr
  bit   addmuldivmod
- - -- -- -- -- --
kup4k Linux 2.6.34-   12.6   14.4 1.3500  103.9  170.6
kup4k Linux 2.6.34-   13.2   15.0 1.3100  100.0  170.5
kup4k Linux 2.6.34-   13.2   14.4 1.2900  104.1  162.1

Basic uint64 operations - times in nanoseconds - smaller is better
--
Host OS int64  int64  int64  int64  int64
 bitaddmuldivmod
- - -- -- -- -- --
kup4k Linux 2.6.34-12.  11.1 1637.9 1602.4
kup4k Linux 2.6.34-13. 

Re: [PATCH 1/2] powerpc, mpc5200: update defconfig to fit with 2.6.37-rc4

2010-12-13 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 Hi Heiko,
 
 -CONFIG_EEPROM_AT24=y
 NACK.
 ... I did just the steps above mentioned, so this is
 automagically done by make mpc5200_defconfig !
 
 Yes, I understood that, but I can't help it: it is still wrong. I need
 it.

Ok, than we need to look why make mpc5200_defconfig did this ...
I try to look at this point.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 1/2] video, sm501: add OF binding to support SM501

2010-12-12 Thread Heiko Schocher
Hello Randy,

Randy Dunlap wrote:
 On Sat, 11 Dec 2010 07:31:15 +0100 Heiko Schocher wrote:
 
 - add commandline options:
   sm501.fb_mode:
 
 sm501.mode:

Sorry, type, should be sm501fb.mode, thanks!

 Specify resolution as xresxyres[-bpp][@refresh]
   sm501.bpp:

Here too, sm501fb.bpp

 Specify bit-per-pixel if not specified mode

 ---

  Documentation/kernel-parameters.txt  |7 +
  Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
  drivers/mfd/sm501.c  |  141 --
  drivers/video/sm501fb.c  |  264 
 +-
  include/linux/sm501.h|8 +
  5 files changed, 299 insertions(+), 151 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

 diff --git a/Documentation/kernel-parameters.txt 
 b/Documentation/kernel-parameters.txt
 index cdd2a6e..6341541 100644
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
 @@ -2301,6 +2301,13 @@ and is between 256 and 4096 characters. It is defined 
 in the file
  merging on their own.
  For more information see Documentation/vm/slub.txt.
  
 +sm501.bpp=  SM501 Display driver:
 +Specify bit-per-pixel if not specified mode
 
   Specifiy bits-per-pixel if not specified by 'mode'
 
 +
 +sm501fb.mode=   SM501 Display driver:
 
 Shouldn't that be sm501.mode ?

No, the name of the source file is sm501fb.c - sm501fb is right here.
As the sm501 is a multifunction device, the fb is more precise here.

 +Specify resolution as
 +xresxyres[-bpp][@refresh]
 +
  smart2= [HW]
  Format: io1[,io2[,...,io8]]
 
 
 However, I think that these shouldn't be added to 
 Documentation/kernel-parameters.txt
 but should be added to the Documentation/fb/ sub-directory either by adding to
 Documentation/fb/modedb.txt or by adding a new file 
 Documentation/fb/sm501.txt.

Ok, do this. Thanks for the review!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] powerpc, mpc5200: update defconfig to fit with 2.6.37-rc4

2010-12-12 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Sat, Dec 11, 2010 at 07:13:00AM +0100, Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 
 I'd say the two patches can be merged. Dunno what Grant prefers whom you 
 should
 CC as he is the maintainer.

I prefer the split in two patches, so we can see, what is added
by the charon board, and what by make mpc5200_defconfig ...

 cc: Wolfram Sang w.s...@pengutronix.de
 cc: linuxppc-dev@lists.ozlabs.org
 ---
 - based against 2.6.37-rc4
 - I did the following steps to generate this patch:

   make mpc5200_defconfig
   make savedefconfig
   cp ./defconfig arch/powerpc/configs/mpc5200_defconfig

  arch/powerpc/configs/mpc5200_defconfig |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)

 diff --git a/arch/powerpc/configs/mpc5200_defconfig 
 b/arch/powerpc/configs/mpc5200_defconfig
 index 7376e27..6f75623 100644
 --- a/arch/powerpc/configs/mpc5200_defconfig
 +++ b/arch/powerpc/configs/mpc5200_defconfig
 @@ -1,5 +1,6 @@
  CONFIG_EXPERIMENTAL=y
  CONFIG_SYSVIPC=y
 +CONFIG_SPARSE_IRQ=y
  CONFIG_LOG_BUF_SHIFT=14
  CONFIG_BLK_DEV_INITRD=y
  # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 @@ -20,7 +21,6 @@ CONFIG_PPC_BESTCOMM=y
  CONFIG_SIMPLE_GPIO=y
  CONFIG_NO_HZ=y
  CONFIG_HIGH_RES_TIMERS=y
 -CONFIG_SPARSE_IRQ=y
  CONFIG_PM=y
  CONFIG_NET=y
  CONFIG_PACKET=y
 @@ -52,7 +52,6 @@ CONFIG_PROC_DEVICETREE=y
  CONFIG_BLK_DEV_LOOP=y
  CONFIG_BLK_DEV_RAM=y
  CONFIG_BLK_DEV_RAM_SIZE=32768
 -CONFIG_EEPROM_AT24=y
 
 NACK.

... I did just the steps above mentioned, so this is
automagically done by make mpc5200_defconfig !

  CONFIG_SCSI_TGT=y
  CONFIG_BLK_DEV_SD=y
  CONFIG_CHR_DEV_SG=y
 @@ -114,7 +113,6 @@ CONFIG_RTC_DRV_DS1307=y
  CONFIG_EXT2_FS=y
  CONFIG_EXT3_FS=y
  # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 -CONFIG_INOTIFY=y
 
 Are you sure?

See comment above, did just the make mpc5200_defconfig
step ...

  CONFIG_MSDOS_FS=y
  CONFIG_VFAT_FS=y
  CONFIG_PROC_KCORE=y
 @@ -132,5 +130,4 @@ CONFIG_PRINTK_TIME=y
  CONFIG_DEBUG_KERNEL=y
  CONFIG_DETECT_HUNG_TASK=y
  CONFIG_DEBUG_INFO=y
 -# CONFIG_RCU_CPU_STALL_DETECTOR is not set
  # CONFIG_CRYPTO_ANSI_CPRNG is not set
 -- 
 1.7.2.3

Thanks for the review!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/2] powerpc, mpc5200: update defconfig to fit with 2.6.37-rc4

2010-12-10 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
cc: linuxppc-dev@lists.ozlabs.org
---
- based against 2.6.37-rc4
- I did the following steps to generate this patch:

  make mpc5200_defconfig
  make savedefconfig
  cp ./defconfig arch/powerpc/configs/mpc5200_defconfig

 arch/powerpc/configs/mpc5200_defconfig |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index 7376e27..6f75623 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -1,5 +1,6 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -20,7 +21,6 @@ CONFIG_PPC_BESTCOMM=y
 CONFIG_SIMPLE_GPIO=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
-CONFIG_SPARSE_IRQ=y
 CONFIG_PM=y
 CONFIG_NET=y
 CONFIG_PACKET=y
@@ -52,7 +52,6 @@ CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=32768
-CONFIG_EEPROM_AT24=y
 CONFIG_SCSI_TGT=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_CHR_DEV_SG=y
@@ -114,7 +113,6 @@ CONFIG_RTC_DRV_DS1307=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_PROC_KCORE=y
@@ -132,5 +130,4 @@ CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/2] powerpc, mpc5200: update mpc5200_defconfig to fit for charon board.

2010-12-10 Thread Heiko Schocher
add to mpc5200_defconfig:

CONFIG_SENSORS_LM80=m
CONFIG_RTC_DRV_DS1374=m

as this is used by the charon board.

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
cc: linuxppc-dev@lists.ozlabs.org

---
- based against 2.6.37-rc4

 arch/powerpc/configs/mpc5200_defconfig |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig 
b/arch/powerpc/configs/mpc5200_defconfig
index 6f75623..70e5d8e 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -78,6 +78,7 @@ CONFIG_SPI_GPIO=m
 CONFIG_SPI_MPC52xx=m
 CONFIG_SPI_MPC52xx_PSC=m
 CONFIG_SPI_SPIDEV=m
+CONFIG_SENSORS_LM80=m
 CONFIG_WATCHDOG=y
 CONFIG_DRM=y
 CONFIG_VIDEO_OUTPUT_CONTROL=y
@@ -110,6 +111,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_NEW_LEDS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_DS1374=m
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2 1/2] video, sm501: add OF binding to support SM501

2010-12-10 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

- add read/write functions for using this driver
  also on powerpc plattforms

- add commandline options:
  sm501.fb_mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.

 Documentation/kernel-parameters.txt  |7 +
 Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
 drivers/mfd/sm501.c  |  141 --
 drivers/video/sm501fb.c  |  264 +-
 include/linux/sm501.h|8 +
 5 files changed, 299 insertions(+), 151 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index cdd2a6e..6341541 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2301,6 +2301,13 @@ and is between 256 and 4096 characters. It is defined in 
the file
merging on their own.
For more information see Documentation/vm/slub.txt.
 
+   sm501.bpp=  SM501 Display driver:
+   Specify bit-per-pixel if not specified mode
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
+
smart2= [HW]
Format: io1[,io2[,...,io8]]
 
diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..9905dd9
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,30 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+
+Example for MPC5200:
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480...@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index bc9275c..d1f952c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -133,10 +133,10 @@ static unsigned long decode_div(unsigned long pll2, 
unsigned long val,
 
 static void sm501_dump_clk(struct sm501_devdata *sm)
 {
-   unsigned long misct = readl(sm-regs + SM501_MISC_TIMING);
-   unsigned long pm0 = readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
-   unsigned long pm1 = readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
-   unsigned long pmc = readl(sm-regs + SM501_POWER_MODE_CONTROL);
+   unsigned long misct = smc501_readl(sm-regs + SM501_MISC_TIMING);
+   unsigned long pm0 = smc501_readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
+   unsigned long pm1 = smc501_readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
+   unsigned long pmc = smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL);
unsigned long sdclk0, sdclk1;
unsigned long pll2 = 0;
 
@@ -193,29 +193,29 @@ static void sm501_dump_regs(struct sm501_devdata *sm)
void __iomem *regs = sm-regs;
 
dev_info(sm-dev, System Control   %08x\n,
-   readl(regs + SM501_SYSTEM_CONTROL));
+   smc501_readl(regs + SM501_SYSTEM_CONTROL));
dev_info(sm-dev, Misc Control %08x\n,
-   readl(regs + SM501_MISC_CONTROL));
+   smc501_readl(regs + SM501_MISC_CONTROL));
dev_info(sm-dev, GPIO Control Low %08x\n,
-   readl(regs + SM501_GPIO31_0_CONTROL));
+   smc501_readl(regs + SM501_GPIO31_0_CONTROL));
dev_info(sm-dev

[PATCH v3 2/2] powerpc, video: add SM501 support for charon board.

2010-12-10 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org

---
- based against 2.6.37-rc4

./scripts/checkpatch.pl 
0003-powerpc-video-add-SM501-support-for-charon-board.patch
total: 0 errors, 0 warnings, 21 lines checked

0003-powerpc-video-add-SM501-support-for-charon-board.patch has no obvious 
style problems and is ready for submission.

- changes since v1:
  - no board specific defconfig file for mpc52xx based boards as suggested
from Wolfram Sang

- changes since v2:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz and lkml to cc, as
  suggested from Paul Mundt.

 arch/powerpc/boot/dts/charon.dts |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 9776889..d9af022 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -186,6 +186,7 @@
#address-cells = 2;
#size-cells = 1;
ranges =   0 0 0xfc00 0x0200
+   1 0 0xe000 0x0400 // CS1 range, SM501
3 0 0xe800 0x0008;
 
fl...@0,0 {
@@ -197,6 +198,14 @@
#address-cells = 1;
};
 
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   mode = 640x480...@60;
+   interrupts = 1 1 3;
+   };
+
mr...@3,0 {
compatible = mtd-ram;
reg = 3 0x0 0x8;
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] powerpc, 5200: add support for charon board

2010-12-08 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Tue, Dec 07, 2010 at 07:58:55AM +0100, Heiko Schocher wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 
 Reviewed-by: Wolfram Sang w.s...@pengutronix.de

Thanks!

One more defconfig question:

Is it possible to add to the mpc5200_defconfig, what is needed for
this board to compile a kernel which contains all features it needs?

I need:

CONFIG_HWMON
CONFIG_SENSORS_LM80
CONFIG_RTC_LIB
CONFIG_RTC_CLASS
CONFIG_RTC_HCTOSYS
CONFIG_RTC_HCTOSYS_DEVICE=rtc0
CONFIG_RTC_INTF_SYSFS
CONFIG_RTC_INTF_PROC
CONFIG_RTC_INTF_DEV
CONFIG_RTC_DRV_DS1374

I think, to have a DTS in kernel for a board, and no defconfig, which
builds a kernel with all features for it, is suboptimal, or?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-08 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Sat, Dec 04, 2010 at 09:23:47AM +0100, Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501

[...]
  Documentation/kernel-parameters.txt  |7 +
  Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
  drivers/mfd/sm501.c  |  141 --
  drivers/video/sm501fb.c  |  264 
 +-
  include/linux/sm501.h|8 +
  5 files changed, 299 insertions(+), 151 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

 Given that this is all SM501 dependent, is there some particular reason
 why you neglected to Cc the author or the MFD folks?

Hups, sorry! No, there is no reason, thanks for detecting this.

Hmm.. couldn;t find a MFD maillinglist?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc, 5200: add defconfig for charon board

2010-12-06 Thread Heiko Schocher
Hello Anatolij,

Anatolij Gustschin wrote:
 On Mon, 06 Dec 2010 08:30:37 +0100
 Heiko Schocher h...@denx.de wrote:
 
 Hello Wolfram,

 Wolfram Sang wrote:
 On Sat, Dec 04, 2010 at 09:21:54AM +0100, Heiko Schocher wrote:

 There shall be only one mpc5200-defconfig. Does the genric one work with 
 your
 board?
 Just tried, mpc5200_defconfig works for me, but...

 ... I miss there the LM81 and RTC DS1374 support ... and in another
 patchset from me, I add SM501 support for this board ... also
 for example, I don;t need CONFIG_FB_RADEON*, CONFIG_SPI* defines

 Hmm.. I understand that maintaining the board_defconfigs is a nightmare.
 Just a fast thought (I am not a kconfig expert):

 As there is a mpc5200_defconfig, couldn;t we get rid of the board
 defconfig(s), and add instead a possibility to store only the changes
 against the mpc5200_defconfig in a file? That would save a lot of unneeded
 lines, and maintaining would be easier as common 5200 config options
 are stored in mpc5200_defconfig ... and a make board_settings would do:
 
 You can save a reduced config file in ./defconfig by running
 make savedefconfig. This ./defconfig file can also be used as a
 board config file in arch/powerpc/configs/52xx/. Look e.g. at the
 config files under arch/powerpc/configs/52xx/.

Ah, Ok, great.

If such a file is accepted in mainline, I make a v2 post.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc, 5200: add defconfig for charon board

2010-12-06 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Mon, Dec 06, 2010 at 10:13:00AM +0100, Heiko Schocher wrote:
 If such a file is accepted in mainline, I make a v2 post.
 
 ===
 
 commit 0a0a5af30b9831e4f049610b5a2d9d5108ff027a
 Author: Grant Likely grant.lik...@secretlab.ca
 Date:   Mon Jan 21 11:22:22 2008 -0700
 
 [POWERPC] mpc5200: merge defconfigs for all mpc5200 boards
 
 There is no reason to have separate defconfigs for each mpc5200 board.
 Instead, here is a common defconfig that can be used for all supported
 platforms.
 
 Merging the defconfigs means there are fewer configuration to test when
 compile testing all of arch/powerpc and should make support easier.
 
 Supported boards:
 Lite5200(b), Efika, TQM5200, CM5200, MotionPro
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca
 
 ===
 
 A defconfig which brings the board up is good enough. Specific projects tend 
 to
 have specialized configs anyhow.

Hmm.. applies this also to the DTS?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc, 5200: add defconfig for charon board

2010-12-06 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 Wolfram Sang wrote:
 On Mon, Dec 06, 2010 at 10:13:00AM +0100, Heiko Schocher wrote:
 If such a file is accepted in mainline, I make a v2 post.
 ===

 commit 0a0a5af30b9831e4f049610b5a2d9d5108ff027a
 Author: Grant Likely grant.lik...@secretlab.ca
 Date:   Mon Jan 21 11:22:22 2008 -0700

 [POWERPC] mpc5200: merge defconfigs for all mpc5200 boards
 
 There is no reason to have separate defconfigs for each mpc5200 board.
 Instead, here is a common defconfig that can be used for all supported
 platforms.
 
 Merging the defconfigs means there are fewer configuration to test when
 compile testing all of arch/powerpc and should make support easier.
 
 Supported boards:
 Lite5200(b), Efika, TQM5200, CM5200, MotionPro
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

 ===

 A defconfig which brings the board up is good enough. Specific projects 
 tend to
 have specialized configs anyhow.
 Hmm.. applies this also to the DTS?
 
 How should that work? :) There is one kernel with all needed options
 (the optional ones being modules) and the DTS selects what is needed.

Ok, so I post a v2 without defconfig patch.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2] powerpc, 5200: add support for charon board

2010-12-06 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfram Sang w.s...@pengutronix.de
---
- based against 2.6.37-rc4

./scripts/checkpatch.pl 0001-powerpc-5200-add-support-for-charon-board.patch
total: 0 errors, 0 warnings, 233 lines checked

0001-powerpc-5200-add-support-for-charon-board.patch has no obvious style 
problems and is ready for submission.

- changes since v1:
  add comments from Wolfram Sang
  - no defconfig file
  - comment corrected in DTS
  - boardlist sorted alphabetically
  - commit log without boardinfo

 arch/powerpc/boot/dts/charon.dts |  226 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 227 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/charon.dts

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
new file mode 100644
index 000..9776889
--- /dev/null
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -0,0 +1,226 @@
+/*
+ * charon board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz m...@semihalf.com
+ *
+ * Copyright (C) 2010 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = anon,charon;
+   compatible = anon,charon;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0800;  // 128MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   };
+
+   ti...@600 { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   fsl,has-wdt;
+   };
+
+   c...@900 {
+   compatible = fsl,mpc5200-mscan;
+   interrupts = 2 17 0;
+   reg = 0x900 0x80;
+   };
+
+   c...@980 {
+   compatible = fsl,mpc5200-mscan;
+   interrupts = 2 18 0;
+   reg = 0x980 0x80;
+   };
+
+   gpio_simple: g...@b00 {
+   compatible = fsl,mpc5200-gpio;
+   reg = 0xb00 0x40;
+   interrupts = 1 7 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   u...@1000 {
+   compatible = fsl,mpc5200-ohci,ohci-be;
+   reg = 0x1000 0xff;
+   interrupts = 2 6 0;
+   };
+
+   dma-control...@1200 {
+   device_type = dma-controller;
+   compatible = fsl,mpc5200-bestcomm;
+   reg = 0x1200 0x80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 10 0  3 11 0
+ 3 12 0  3 13 0  3 14 0  3 15 0;
+   };
+
+   x...@1f00 {
+   compatible = fsl,mpc5200-xlb;
+   reg = 0x1f00 0x100

[PATCH 2/2 v2] powerpc, video: add SM501 support for charon board.

2010-12-06 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
---
- based against 2.6.37-rc4

./scripts/checkpatch.pl 
0003-powerpc-video-add-SM501-support-for-charon-board.patch
total: 0 errors, 0 warnings, 21 lines checked

0003-powerpc-video-add-SM501-support-for-charon-board.patch has no obvious 
style problems and is ready for submission.

- changes since v1:
  - no board specific defconfig file for mpc52xx based boards as suggested
from Wolfram Sang

 arch/powerpc/boot/dts/charon.dts |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 9776889..d9af022 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -186,6 +186,7 @@
#address-cells = 2;
#size-cells = 1;
ranges =   0 0 0xfc00 0x0200
+   1 0 0xe000 0x0400 // CS1 range, SM501
3 0 0xe800 0x0008;
 
fl...@0,0 {
@@ -197,6 +198,14 @@
#address-cells = 1;
};
 
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   mode = 640x480...@60;
+   interrupts = 1 1 3;
+   };
+
mr...@3,0 {
compatible = mtd-ram;
reg = 3 0x0 0x8;
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] powerpc, 5200: add support for charon board

2010-12-05 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Sat, Dec 04, 2010 at 09:21:46AM +0100, Heiko Schocher wrote:
 - MPC5200
 - serielle console on PSC 1
 
 serial

Hups, thanks!

 - 128MiB RAM
 - 32MiB NOR Flash
 - FEC Ethernet
 - 2 I2C Busses
 - FPGA on CS3 accessed through mtd-ram
 - ATA
 
 although I am not sure we need those details in the commit log

Okay, I can remove them.

 Signed-off-by: Heiko Schocher h...@denx.de
 ---
 based against 2.6.37-rc4

 ./scripts/checkpatch.pl 0001-powerpc-5200-add-support-for-charon-board.patch
 total: 0 errors, 0 warnings, 233 lines checked

 0001-powerpc-5200-add-support-for-charon-board.patch has no obvious style 
 problems and is ready for submission.

  arch/powerpc/boot/dts/charon.dts |  226 
 ++
  arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
  2 files changed, 227 insertions(+), 0 deletions(-)
  create mode 100644 arch/powerpc/boot/dts/charon.dts

 diff --git a/arch/powerpc/boot/dts/charon.dts 
 b/arch/powerpc/boot/dts/charon.dts
 new file mode 100644
 index 000..768f0cc
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/charon.dts
 @@ -0,0 +1,226 @@
 +/*
 + * TQM5200 board Device Tree Source
 
 Ooops ;) Your board name here, maybe based on TQM

Yep, thats right! I rename this to charon, thanks for detecting.

[...]
 diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c 
 b/arch/powerpc/platforms/52xx/mpc5200_simple.c
 index d45be5b..d2e0096 100644
 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
 +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
 @@ -58,6 +58,7 @@ static char *board[] __initdata = {
  promess,motionpro,
  schindler,cm5200,
  tqc,tqm5200,
 +anon,charon,
 
 Those are sorted alphabetically

Change this!

Thanks for the review,
bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] powerpc, 5200: add support for charon board

2010-12-05 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Mon, Dec 06, 2010 at 07:29:23AM +0100, Heiko Schocher wrote:
 
 Thanks for the review,
 
 You're welcome. Oh, just to make sure: It is really a MPC5200 and not a
 MPC5200B?

Yep, it is a MPC5200

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc, 5200: add defconfig for charon board

2010-12-05 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Sat, Dec 04, 2010 at 09:21:54AM +0100, Heiko Schocher wrote:
 
 There shall be only one mpc5200-defconfig. Does the genric one work with your
 board?

Just tried, mpc5200_defconfig works for me, but...

... I miss there the LM81 and RTC DS1374 support ... and in another
patchset from me, I add SM501 support for this board ... also
for example, I don;t need CONFIG_FB_RADEON*, CONFIG_SPI* defines

Hmm.. I understand that maintaining the board_defconfigs is a nightmare.
Just a fast thought (I am not a kconfig expert):

As there is a mpc5200_defconfig, couldn;t we get rid of the board
defconfig(s), and add instead a possibility to store only the changes
against the mpc5200_defconfig in a file? That would save a lot of unneeded
lines, and maintaining would be easier as common 5200 config options
are stored in mpc5200_defconfig ... and a make board_settings would do:

- call make mpc5200_defconfig
- process differences stored in board_settings
  (something like menuconfig, just not interactive)

(we could generalize that approach, because I think, all defconfigs
 are not easy to maintain, if we say first line is always the defconfig
 we call, following lines are options different to that ...)

Example for the charon board charon_settings file:

call mpc5200_defconfig  // call make mpc5200_defconfig
enable SENSORS_LM80 // call something like make menuconfig -e SENSORS_LM80
disable FB_RADEON   // call something like make menuconfig -d FB_RADEON
disable SPI
disable RTC_DRV_DS1307
enable RTC_DRV_DS1374
...

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/2] powerpc, 5200: add defconfig for charon board

2010-12-04 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
---
based against 2.6.37-rc4

./scripts/checkpatch.pl 0002-powerpc-5200-add-defconfig-for-charon-board.patch 
lems and is ready for
total: 0 errors, 0 warnings, 1529 lines checked

0002-powerpc-5200-add-defconfig-for-charon-board.patch has no obvious style 
problems and is ready for submission.

 arch/powerpc/configs/52xx/charon_defconfig | 1529 
 1 files changed, 1529 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/52xx/charon_defconfig

diff --git a/arch/powerpc/configs/52xx/charon_defconfig 
b/arch/powerpc/configs/52xx/charon_defconfig
new file mode 100644
index 000..edf3d40
--- /dev/null
+++ b/arch/powerpc/configs/52xx/charon_defconfig
@@ -0,0 +1,1529 @@
+#
+# Automatically generated make config: don't edit
+# Linux/powerpc 2.6.37-rc4 Kernel Configuration
+# Tue Nov 30 12:24:32 2010
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+CONFIG_PPC_BOOK3S_32=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_PPC_BOOK3S=y
+CONFIG_6xx=y
+CONFIG_PPC_FPU=y
+# CONFIG_ALTIVEC is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_PPC_HAVE_PMU_SUPPORT=y
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_32BIT=y
+CONFIG_WORD_SIZE=32
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
+# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_NR_IRQS=512
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+# CONFIG_PPC_UDBG_16550 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y
+CONFIG_HAVE_IRQ_WORK=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_CROSS_COMPILE=
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_HAVE_GENERIC_HARDIRQS is not set
+CONFIG_SPARSE_IRQ=y
+
+#
+# RCU Subsystem
+#
+CONFIG_TINY_RCU=y
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+# CONFIG_RD_LZO is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y

[PATCH 2/2] powerpc, video: add SM501 support for charon board.

2010-12-04 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
---
based against 2.6.37-rc4

./scripts/checkpatch.pl 
0004-powerpc-video-add-SM501-support-for-charon-board.patch lems and is ready 
for
total: 0 errors, 0 warnings, 249 lines checked

0004-powerpc-video-add-SM501-support-for-charon-board.patch has no obvious 
style problems and is ready for submission.

 arch/powerpc/boot/dts/charon.dts   |9 ++
 arch/powerpc/configs/52xx/charon_defconfig |  176 +++-
 2 files changed, 179 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
index 768f0cc..b2353b3 100644
--- a/arch/powerpc/boot/dts/charon.dts
+++ b/arch/powerpc/boot/dts/charon.dts
@@ -186,6 +186,7 @@
#address-cells = 2;
#size-cells = 1;
ranges =   0 0 0xfc00 0x0200
+   1 0 0xe000 0x0400 // CS1 range, SM501
3 0 0xe800 0x0008;
 
fl...@0,0 {
@@ -197,6 +198,14 @@
#address-cells = 1;
};
 
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   mode = 640x480...@60;
+   interrupts = 1 1 3;
+   };
+
mr...@3,0 {
compatible = mtd-ram;
reg = 3 0x0 0x8;
diff --git a/arch/powerpc/configs/52xx/charon_defconfig 
b/arch/powerpc/configs/52xx/charon_defconfig
index edf3d40..05a46cf 100644
--- a/arch/powerpc/configs/52xx/charon_defconfig
+++ b/arch/powerpc/configs/52xx/charon_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux/powerpc 2.6.37-rc4 Kernel Configuration
-# Tue Nov 30 12:24:32 2010
+# Tue Nov 30 12:32:58 2010
 #
 # CONFIG_PPC64 is not set
 
@@ -719,18 +719,78 @@ CONFIG_WLAN=y
 #
 # Input device support
 #
-# CONFIG_INPUT is not set
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_TCA6416 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_MCS is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_SENTELIC is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_SYNAPTICS_I2C is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Hardware I/O ports
 #
-# CONFIG_SERIO is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO_XILINX_XPS_PS2 is not set
+# CONFIG_SERIO_ALTERA_PS2 is not set
+# CONFIG_SERIO_PS2MULT is not set
 # CONFIG_GAMEPORT is not set
 
 #
 # Character devices
 #
-# CONFIG_VT is not set
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_N_GSM is not set
@@ -885,6 +945,7 @@ CONFIG_SENSORS_LM80=y
 # CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
 # CONFIG_THERMAL is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -908,7 +969,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_MFD_SUPPORT=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_88PM860X is not set
-# CONFIG_MFD_SM501 is not set
+CONFIG_MFD_SM501=y
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_TPS6507X is not set
 # CONFIG_TWL4030_CORE is not set
@@ -934,14 +995,116 @@ CONFIG_MFD_SUPPORT=y
 # CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT

[PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-04 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

- add read/write functions for using this driver
  also on powerpc plattforms

- add commandline options:
  sm501.fb_mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
---
based against 2.6.37-rc4

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch 
lems and is ready for
total: 0 errors, 0 warnings, 1067 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.

 Documentation/kernel-parameters.txt  |7 +
 Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
 drivers/mfd/sm501.c  |  141 --
 drivers/video/sm501fb.c  |  264 +-
 include/linux/sm501.h|8 +
 5 files changed, 299 insertions(+), 151 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index cdd2a6e..6341541 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2301,6 +2301,13 @@ and is between 256 and 4096 characters. It is defined in 
the file
merging on their own.
For more information see Documentation/vm/slub.txt.
 
+   sm501.bpp=  SM501 Display driver:
+   Specify bit-per-pixel if not specified mode
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
+
smart2= [HW]
Format: io1[,io2[,...,io8]]
 
diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..9905dd9
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,30 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+
+Example for MPC5200:
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480...@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index bc9275c..d1f952c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -133,10 +133,10 @@ static unsigned long decode_div(unsigned long pll2, 
unsigned long val,
 
 static void sm501_dump_clk(struct sm501_devdata *sm)
 {
-   unsigned long misct = readl(sm-regs + SM501_MISC_TIMING);
-   unsigned long pm0 = readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
-   unsigned long pm1 = readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
-   unsigned long pmc = readl(sm-regs + SM501_POWER_MODE_CONTROL);
+   unsigned long misct = smc501_readl(sm-regs + SM501_MISC_TIMING);
+   unsigned long pm0 = smc501_readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
+   unsigned long pm1 = smc501_readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
+   unsigned long pmc = smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL);
unsigned long sdclk0, sdclk1;
unsigned long pll2 = 0;
 
@@ -193,29 +193,29 @@ static void sm501_dump_regs(struct sm501_devdata *sm)
void __iomem *regs = sm-regs;
 
dev_info(sm-dev, System Control   %08x\n,
-   readl(regs + SM501_SYSTEM_CONTROL));
+   smc501_readl(regs + SM501_SYSTEM_CONTROL));
dev_info(sm-dev, Misc Control %08x\n,
-   readl(regs + SM501_MISC_CONTROL));
+   smc501_readl(regs + SM501_MISC_CONTROL));
dev_info(sm-dev, GPIO Control Low %08x\n,
-   readl(regs + SM501_GPIO31_0_CONTROL));
+   smc501_readl(regs

[PATCH] powerpc, time: printk time stamp init not correct

2010-11-22 Thread Heiko Schocher
problem:

I see sometimes on my mpc5200 based board such printk timing
information:

[0.00] NR_IRQS:512 nr_irqs:512 16
[0.00] MPC52xx PIC is up and running!
[0.00] clocksource: timebase mult[79364d9] shift[22] registered
[0.00] console [ttyPSC0] enabled
[  130.300633] pid_max: default: 32768 minimum: 301
[  130.305647] Mount-cache hash table entries: 512
[  130.315818] NET: Registered protocol family 16

reason:
if the tbu not starts from 0 when linux boots, boot_tb
maybe could not store the real 64 bit tbu value, because
boot_tp is only a 32 bit unsigned long.

solution:
change boot_tb to unsigned long long

Signed-off-by: Heiko Schocher h...@denx.de
cc: Wolfgang Denk w...@denx.de
---
 arch/powerpc/kernel/time.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index fa91732..a66df7d 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(rtc_lock);
 
 static u64 tb_to_ns_scale __read_mostly;
 static unsigned tb_to_ns_shift __read_mostly;
-static unsigned long boot_tb __read_mostly;
+static unsigned long long boot_tb __read_mostly;
 
 extern struct timezone sys_tz;
 static long timezone_offset;
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: powerpc, fs_enet: scanning PHY after Linux is up

2010-10-06 Thread Heiko Schocher
Hello Grant,

Thanks for your answer!

Grant Likely wrote:
 On Mon, Oct 4, 2010 at 1:32 AM, Heiko Schocher h...@denx.de wrote:
 Hello all,

 we have on the mgcoge arch/powerpc/boot/dts/mgcoge.dts 3 fs_enet
 devices. The first is accessible on boot, and so get correct
 probed and works fine. For the other two fs_enet devices the PHYs
 are on startup in reset, and gets later, through userapplikations,
 out of reset ... so, on bootup, this 2 fs_enet devices could
 not detect the PHY in drivers/of/of_mdio.c of_mdiobus_register(),
 and if we want to use them later, we get for example:

 -bash-3.2# ifconfig eth2 172.31.31.33
 net eth2: Could not attach to PHY
 SIOCSIFFLAGS: No such device

 So the problem is, that we cannot rescan the PHYs, if they are
 accessible. Also we could not load the fs_enet driver as a module,
 because the first port is used fix.

 So, first question which comes in my mind, is:

 Is detecting the phy in drivers/of/of_mdio.c of_mdiobus_register()
 the right place, or should it not better be done, when really
 using the port?

 But we found another way to solve this issue:

 After the PHYs are out of reset, we just have to rescan the PHYs
 with (for example PHY with addr 1)

 err = mdiobus_scan(bus, 1);

 and

 of_find_node_by_path(/s...@f000/c...@119c0/m...@10d40/ethernet-...@1);
 of_node_get(np);
 dev_archdata_set_node(err-dev.archdata, np);

 but thats just a hack ...
 
 Yeah, that's a hack.  It really needs to be done via the of_mdio
 mechanisms so that dt -- phy_device linkages remain consistent.

Yep, I know, thats the reason why I ask ;-)

 So, the question is, is there a possibility to solve this problem?

 If there is no standard option, what would be with adding a
 scan_phy file in

 /proc/device-tree/s...@f000/c...@119c0/md...@10d40
 (or better destination?)

 which with we could rescan a PHY with
 echo addr  /proc/device-tree/s...@f000/c...@119c0/md...@10d40/scan_phy
 (so there is no need for using of_find_node_by_path(), as we should
  have the associated device node here, and can step through the child
  nodes with for_each_child_of_node(np, child) and check if reg == addr)

 or shouldn;t be at least, if the phy couldn;t be found when opening
 the port, retrigger a scanning, if the phy now is accessible?
 
 One option would be to still register a phy_device for each phy
 described in the device tree, but defer binding a driver to each phy
 that doesn't respond.  Then at of_phy_find_device() time, if it

Maybe I din;t get the trick, but the problem is, that
you can;t register a phy_device in drivers/of/of_mdio.c
of_mdiobus_register(), if the phy didn;t respond with the
phy_id ... and of_phy_find_device() is not (yet) used in fs_enet

 matches with a phy_device that isn't bound to a driver yet, then
 re-trigger the binding operation.  At which point the phy id can be
 probed and the correct driver can be chosen.  If binding succeeds,
 then return the phy_device handle.  If not, then fail as it currently
 does.

Wouldn;t it be good, just if we need a PHY (on calling fs_enet_open)
to look if there is one?

Something like that (not tested):

in drivers/net/fs_enet/fs_enet-main.c in fs_init_phy()
called from fs_enet_open():

Do first:
phydev =  of_phy_find_device(fep-fpi-phy_node);

Look if there is a driver (phy_dev-drv == NULL ?)

If not, call new function
of_mdiobus_register_phy(mii_bus, fep-fpi-phy_node)
see below patch for it.

If this succeeds, all is OK, and we can use this phy,
else ethernet not work.

!!just no idea, how to get mii_bus pointer ...

here the patch for the new function of_mdiobus_register_phy():

diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index b474833..7afbb0b 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -21,6 +21,51 @@
 MODULE_AUTHOR(Grant Likely grant.lik...@secretlab.ca);
 MODULE_LICENSE(GPL);

+int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *child)
+{
+   struct phy_device *phy;
+   const __be32 *addr;
+   int len;
+   int rc;
+
+   /* A PHY must have a reg property in the range [0-31] */
+   addr = of_get_property(child, reg, len);
+   if (!addr || len  sizeof(*addr) || *addr = 32 || *addr  0) {
+   dev_err(mdio-dev, %s has invalid PHY address\n,
+   child-full_name);
+   return -1;
+   }
+
+   if (mdio-irq) {
+   mdio-irq[*addr] = irq_of_parse_and_map(child, 0);
+   if (!mdio-irq[*addr])
+   mdio-irq[*addr] = PHY_POLL;
+   }
+
+   phy = get_phy_device(mdio, be32_to_cpup(addr));
+   if (!phy || IS_ERR(phy)) {
+   dev_err(mdio-dev, error probing PHY at address %i\n,
+   *addr);
+   return -2;
+   }
+   phy_scan_fixups(phy);
+   /* Associate the OF node with the device structure so it
+* can be looked up later */
+   of_node_get(child);
+   dev_archdata_set_node(phy-dev.archdata

powerpc, fs_enet: scanning PHY after Linux is up

2010-10-04 Thread Heiko Schocher
Hello all,

we have on the mgcoge arch/powerpc/boot/dts/mgcoge.dts 3 fs_enet
devices. The first is accessible on boot, and so get correct
probed and works fine. For the other two fs_enet devices the PHYs
are on startup in reset, and gets later, through userapplikations,
out of reset ... so, on bootup, this 2 fs_enet devices could
not detect the PHY in drivers/of/of_mdio.c of_mdiobus_register(),
and if we want to use them later, we get for example:

-bash-3.2# ifconfig eth2 172.31.31.33
net eth2: Could not attach to PHY
SIOCSIFFLAGS: No such device

So the problem is, that we cannot rescan the PHYs, if they are
accessible. Also we could not load the fs_enet driver as a module,
because the first port is used fix.

So, first question which comes in my mind, is:

Is detecting the phy in drivers/of/of_mdio.c of_mdiobus_register()
the right place, or should it not better be done, when really
using the port?

But we found another way to solve this issue:

After the PHYs are out of reset, we just have to rescan the PHYs
with (for example PHY with addr 1)

err = mdiobus_scan(bus, 1);

and

of_find_node_by_path(/s...@f000/c...@119c0/m...@10d40/ethernet-...@1);
of_node_get(np);
dev_archdata_set_node(err-dev.archdata, np);

but thats just a hack ...

So, the question is, is there a possibility to solve this problem?

If there is no standard option, what would be with adding a
scan_phy file in

/proc/device-tree/s...@f000/c...@119c0/md...@10d40
(or better destination?)

which with we could rescan a PHY with
echo addr  /proc/device-tree/s...@f000/c...@119c0/md...@10d40/scan_phy
(so there is no need for using of_find_node_by_path(), as we should
 have the associated device node here, and can step through the child
 nodes with for_each_child_of_node(np, child) and check if reg == addr)

or shouldn;t be at least, if the phy couldn;t be found when opening
the port, retrigger a scanning, if the phy now is accessible?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [git pull] Please pull powerpc.git merge branch

2010-04-27 Thread Heiko Schocher
Hello Benjamin,

Benjamin Herrenschmidt wrote:
 Hi Linus !
 
 PowerPC has been a bit quiet this time around :-) That is until Kumar
 woke me up with a few fixes and defconfig updates for the freescale
 embedded platforms.

I got no comments for the following patch:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-March/081303.html

Can this go in?

Thanks
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Linuxppc-dev Digest, Vol 67, Issue 131

2010-03-24 Thread Heiko Schocher
Hello Daniel,

 Date: Wed, 24 Mar 2010 13:33:48 +1100
 From: Daniel Ng daniel.ng1...@gmail.com
 To: linuxppc-...@ozlabs.org
 Subject: SPI Driver for CPM2 8260 (8272 family)
 Message-ID:
   547eba1b1003231933x738b2660u364b12d43bf9...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1
 
 Hi,
 
 Is there an SPI Driver in Linux for CPM2 8260-based processors?
 
 I'm quite surprised that there doesn't seem to be one. Can someone
 please explain why this is?

Try to use drivers/spi/spi_mpc8xxx.c
It should work on CPM2 based processors.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


powerpc, 8xx: Add support for the MPC8xx based boards from TQC

2010-03-23 Thread Heiko Schocher
Supported SMC1 (serial console), SCC1 Ethernet (10Mbps HD).
FEC Ethernet, 8MB NOR CFI Flash.

Tested on STK8xx with TQM860L (with FEC)
and with TQM855M (without FEC).

Signed-off-by: Heiko Schocher h...@denx.de
---
- based against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  commit bca14dd14f3b0c5e3e2d1d314679f85b67871365
- checked with checkpatch
  $ scripts/checkpatch.pl 
0001-powerpc-8xx-Add-support-for-the-MPC8xx-based-board.patch
  total: 0 errors, 0 warnings, 1278 lines checked

  0001-powerpc-8xx-Add-support-for-the-MPC8xx-based-board.patch has no obvious 
style problems and is ready for submission.
  $

 arch/powerpc/boot/dts/tqm8xx.dts  |  172 ++
 arch/powerpc/configs/tqm8xx_defconfig |  934 +
 arch/powerpc/platforms/8xx/Kconfig|6 +
 arch/powerpc/platforms/8xx/Makefile   |1 +
 arch/powerpc/platforms/8xx/tqm8xx_setup.c |  156 +
 5 files changed, 1269 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm8xx.dts
 create mode 100644 arch/powerpc/configs/tqm8xx_defconfig
 create mode 100644 arch/powerpc/platforms/8xx/tqm8xx_setup.c

diff --git a/arch/powerpc/boot/dts/tqm8xx.dts b/arch/powerpc/boot/dts/tqm8xx.dts
new file mode 100644
index 000..f6da7ec
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm8xx.dts
@@ -0,0 +1,172 @@
+/*
+ * TQM8XX Device Tree Source
+ *
+ * Heiko Schocher h...@denx.de
+ * 2010 DENX Software Engineering GmbH
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = TQM8xx;
+   compatible = tqc,tqm8xx;
+   #address-cells = 1;
+   #size-cells = 1;
+
+   aliases {
+   ethernet0 = eth0;
+   ethernet1 = eth1;
+   mdio1 = phy1;
+   serial0 = smc1;
+   };
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,8...@0 {
+   device_type = cpu;
+   reg = 0x0;
+   d-cache-line-size = 16;   // 16 bytes
+   i-cache-line-size = 16;   // 16 bytes
+   d-cache-size = 0x1000;// L1, 4K
+   i-cache-size = 0x1000;// L1, 4K
+   timebase-frequency = 0;
+   bus-frequency = 0;
+   clock-frequency = 0;
+   interrupts = 15 2;// decrementer interrupt
+   interrupt-parent = PIC;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x0 0x200;
+   };
+
+   local...@fff00100 {
+   compatible = fsl,mpc860-localbus, fsl,pq1-localbus;
+   #address-cells = 2;
+   #size-cells = 1;
+   reg = 0xfff00100 0x40;
+
+   ranges = 
+   0x0 0x0 0x4000 0x80
+   ;
+
+   fl...@0,0 {
+   compatible = cfi-flash;
+   reg = 0 0 0x80;
+   #address-cells = 1;
+   #size-cells = 1;
+   bank-width = 4;
+   device-width = 2;
+   };
+   };
+
+   s...@fff0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   device_type = soc;
+   ranges = 0x0 0xfff0 0x4000;
+
+   phy1: m...@e00 {
+   compatible = fsl,mpc866-fec-mdio, fsl,pq1-fec-mdio;
+   reg = 0xe00 0x188;
+   #address-cells = 1;
+   #size-cells = 0;
+   PHY: ethernet-...@f {
+   reg = 0xf;
+   device_type = ethernet-phy;
+   };
+   };
+
+   eth1: ether...@e00 {
+   device_type = network;
+   compatible = fsl,mpc866-fec-enet,
+fsl,pq1-fec-enet;
+   reg = 0xe00 0x188;
+   interrupts = 3 1;
+   interrupt-parent = PIC;
+   phy-handle = PHY;
+   linux,network-index = 1;
+   };
+
+   PIC: p...@0 {
+   interrupt-controller;
+   #interrupt-cells = 2;
+   reg = 0x0 0x24;
+   compatible = fsl,mpc860-pic, fsl,pq1-pic;
+   };
+
+   c...@9c0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc860-cpm, fsl

Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-08 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
 Heiko Schocher h...@denx.de wrote on 2010/03/08 08:46:29:
 Hello Joakim,

 Joakim Tjernlund wrote:
 [...]
 What would be interesting is to skip patch 3 and turn off
 MODULES add PIN_TLB and compare that against your unpatched .33 but
 with MODULES off and PIN_TLB on
 run version

 1-4   Linux2.6.33-rc without module support and PIN_TLB=on
 5-8   Linux2.6.33-rc without module support and PIN_TLB=on + patches 1,2,4

  L M B E N C H  3 . 0   S U M M A R Y
  
(Alpha software, do not distribute)
 
 hmm, these results varies a lot. The only stable result I can see is:
 
 Memory latencies in nanoseconds - smaller is better
 (WARNING - may not be correct, check graphs)
 --
 Host OS   Mhz   L1 $   L2 $Main memRand mem
 Guesses
 - -   ---      
 ---
 tqm8xxLinux 2.6.33-66   31.7  183.2   184.0  1163.0No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  183.2   184.0  1164.8No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  183.2   184.0  1163.2No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  183.2   183.8  1163.7No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  172.4   173.2  1147.3No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  172.5   173.2  1148.3No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  172.5   173.1  1146.9No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  172.5   173.2  1147.3No L2 
 cache?
 
 I don't see why the other results vary so much. Are you using NFS or having 
 much network
 traffic?

I use NFS.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-07 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
[...]
 What would be interesting is to skip patch 3 and turn off
 MODULES add PIN_TLB and compare that against your unpatched .33 but
 with MODULES off and PIN_TLB on

run version

1-4 Linux2.6.33-rc without module support and PIN_TLB=on
5-8 Linux2.6.33-rc without module support and PIN_TLB=on + patches 1,2,4

 L M B E N C H  3 . 0   S U M M A R Y
 
 (Alpha software, do not distribute)

Basic system parameters
--
Host OS Description  Mhz  tlb  cache  mem   scal
 pages line   par   load
   bytes
- - ---  - - -- 
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.01001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.03001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.01001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.01001

Processor, Processes - times in microseconds - smaller is better
--
Host OS  Mhz null null  open slct sig  sig  fork exec sh
 call  I/O stat clos TCP  inst hndl proc proc proc
- -           
tqm8xxLinux 2.6.33-   66 2.97 8.91 127. 1238 270. 22.3 92.1 6386 27.K 83.K
tqm8xxLinux 2.6.33-   66 3.05 8.99 129. 1208 261. 22.3 85.3 6418 27.K 83.K
tqm8xxLinux 2.6.33-   66 3.05 8.81 128. 1205 270. 22.3 87.3 6342 27.K 82.K
tqm8xxLinux 2.6.33-   66 3.05 8.82 132. 1215 270. 23.1 86.7 6357 27.K 82.K
tqm8xxLinux 2.6.33-   66 3.28 9.29 128. 1257 260. 23.9 83.7 6511 28.K 84.K
tqm8xxLinux 2.6.33-   66 3.34 9.35 126. 1264 271. 23.1 86.6 6437 27.K 84.K
tqm8xxLinux 2.6.33-   66 3.19 8.97 130. 1212 271. 23.1 95.3 6480 27.K 84.K
tqm8xxLinux 2.6.33-   66 3.28 8.76 127. 1229 269. 22.9 90.9 6293 27.K 82.K

Basic integer operations - times in nanoseconds - smaller is better
---
Host OS  intgr intgr  intgr  intgr  intgr
  bit   addmuldivmod
- - -- -- -- -- --
tqm8xxLinux 2.6.33-   15.2   17.9 1.2500  124.1  202.4
tqm8xxLinux 2.6.33-   15.6   18.0 1.1900  124.1  196.4
tqm8xxLinux 2.6.33-   15.2   17.9 1.2400  124.9  202.5
tqm8xxLinux 2.6.33-   15.2   17.9 1.2400  124.2  196.8
tqm8xxLinux 2.6.33-   15.7   17.9 1.5500  124.2  203.6
tqm8xxLinux 2.6.33-   15.7   17.9 1.5500  124.2  202.1
tqm8xxLinux 2.6.33-   15.7   17.9 1.5700  125.0  202.2
tqm8xxLinux 2.6.33-   15.7   17.9 1.5500  121.1  196.4

Basic uint64 operations - times in nanoseconds - smaller is better
--
Host OS int64  int64  int64  int64  int64
 bitaddmuldivmod
- - -- -- -- -- --
tqm8xxLinux 2.6.33-15.  12.9 1944.1 1895.2
tqm8xxLinux 2.6.33-15.  12.9 1886.3 1894.4
tqm8xxLinux 2.6.33-15.  12.9 1944.1 1895.2
tqm8xxLinux 2.6.33-15.  12.9 1886.3 1894.8
tqm8xxLinux 2.6.33-15.  13.2 1944.1 1894.4
tqm8xxLinux 2.6.33-15.  13.2 1944.8 1896.3
tqm8xxLinux 2.6.33-15.  13.2 1945.2 1837.4
tqm8xxLinux 2.6.33-15.  13.2 1957.8 1907.4

Basic float operations - times in nanoseconds - smaller is better
-
Host OS  float  float  float  float
 addmuldivbogo
- - -- -- -- --
tqm8xxLinux 2.6.33- 1011.0 1620.2 5467.0 9868.0
tqm8xxLinux 2.6.33- 1004.5 1630.1 5468.0 9852.0
tqm8xxLinux 2.6.33- 1012.2 1620.5 5472.0 9855.0
tqm8xxLinux 2.6.33- 1011.0 1620.2 5469.0 9866.0
tqm8xxLinux 2.6.33- 1004.8 1617.3 5503.0 9856.0
tqm8xxLinux 2.6.33- 1004.9 1577.1 5469.0 9859.0
tqm8xxLinux 2.6.33- 1011.4 1618.5 5470.0 9859.0
tqm8xxLinux 2.6.33- 1004.9 1620.5 5471.0 9904.0

Basic double operations - times in nanoseconds - smaller is better
--
Host OS  double double 

Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-04 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
 Could you try reverting patch:
   8xx: Don't touch ACCESSED when no SWAP.
 and see if that makes a difference?
[...]
 Turning on pinned TLBs(you must turn on ADVANCED_OPTIONS first) could be an 
 improvement,
 regardless of my patches.

here the results:

run version

1-4 2.6.33-rc6 without your patches
5-8 2.6.33-rc6 with all your patches
9-122.6.33-rc6 with patches 1,2 and 4 (without 8xx: Don't touch ACCESSED 
when no SWAP)
13-16   2.6.33-rc6 with all your patches and CONFIG_PIN_TLB=y

 Turning on pinned TLBs(you must turn on ADVANCED_OPTIONS first) could be an 
 improvement,
 regardless of my patches.

make[1]: Entering directory `/home/hs/lmbench-3.0-a9/results'

 L M B E N C H  3 . 0   S U M M A R Y
 
 (Alpha software, do not distribute)

Basic system parameters
--
Host OS Description  Mhz  tlb  cache  mem   scal
 pages line   par   load
   bytes
- - ---  - - -- 
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.01001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.01001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.17001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.01001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   662816 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001


Processor, Processes - times in microseconds - smaller is better
--
Host OS  Mhz null null  open slct sig  sig  fork exec sh
 call  I/O stat clos TCP  inst hndl proc proc proc
- -           
tqm8xxLinux 2.6.33-   66 2.97 10.3 129. 1377 272. 21.8 91.3 6949 29.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.5 124. 1375 273. 21.8 91.3 7136 30.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.6 129. 1365 272. 21.2 96.6 6889 29.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.5 124. 1309 272. 21.8 101. 6896 29.K 89.K
tqm8xxLinux 2.6.33-   66 2.97 8.86 126. 1336 273. 21.7 84.2 6785 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.06 8.90 130. 1343 263. 21.3 84.7 7080 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.52 8.97 129. 1339 270. 22.4 84.4 6823 29.K 88.K
tqm8xxLinux 2.6.33-   66 2.97 8.99 127. 1333 261. 22.4 87.0 7037 29.K 87.K
tqm8xxLinux 2.6.33-   66 3.06 8.83 128. 1355 269. 20.7 89.2 6927 29.K 87.K
tqm8xxLinux 2.6.33-   66 3.05 8.84 127. 1344 271. 21.6 90.5 6868 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.06 8.84 131. 1376 260. 21.4 88.1 7119 29.K 87.K
tqm8xxLinux 2.6.33-   66 3.05 8.90 122. 1342 272. 21.4 88.6 6847 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.19 9.10 122. 1205 265. 20.9 90.3 6358 27.K 83.K
tqm8xxLinux 2.6.33-   66 3.28 9.10 124. 1208 270. 20.9 95.2 6217 27.K 82.K
tqm8xxLinux 2.6.33-   66 3.19 8.98 125. 1210 270. 21.1 87.9 6364 27.K 83.K
tqm8xxLinux 2.6.33-   66 3.19 8.86 124. 1237 262. 21.3 90.7 6311 27.K 84.K

Basic integer operations - times in nanoseconds - smaller is better
---
Host OS  intgr intgr  intgr  intgr  intgr
  bit   addmuldivmod
- - -- -- -- -- --
tqm8xxLinux 2.6.33-   15.7   18.0 1.5600  124.2  203.1
tqm8xxLinux 2.6.33-   15.7   17.4 1.5800  121.1  202.8
tqm8xxLinux 2.6.33-   15.2   17.9 1.6200  124.2  202.7
tqm8xxLinux 2.6.33-   15.2   17.9 1.6000  125.0  204.0
tqm8xxLinux 2.6.33-   15.7   18.1 1.5600  124.7  204.4
tqm8xxLinux 2.6.33-   15.7   18.1 1.5800  124.2  202.8
tqm8xxLinux 2.6.33-   15.7   17.9 1.5500  124.2  203.2
tqm8xxLinux 2.6.33-   15.7   18.1 1.5500  124.5  202.0
tqm8xxLinux 2.6.33-   15.7   18.1 1.5500  

Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-04 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
 Wolfgang Denk w...@denx.de wrote on 2010/03/04 13:16:56:
 From: Wolfgang Denk w...@denx.de
 To: h...@denx.de
 Cc: Joakim Tjernlund joakim.tjernl...@transmode.se, Klaus-Jürgen
 heyd...@kieback-peter.de, linuxppc-...@ozlabs.org, Scott Wood
 scottw...@freescale.com
 Date: 2010/03/04 13:17
 Subject: Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

 Dear Heiko,

 thanks for running the tests.

 In message 4b8f8bb4.6070...@denx.de you wrote:
 here the results:

 run   version

 1-4   2.6.33-rc6 without your patches
 5-8   2.6.33-rc6 with all your patches
 9-12   2.6.33-rc6 with patches 1,2 and 4 (without 8xx: Don't touch ACCESSED
 when no SWAP)
 13-16   2.6.33-rc6 with all your patches and CONFIG_PIN_TLB=y
 So CONFIG_PIN_TLB imroves the performance as expected, while the other
 patches don;t show any measurable improvememt - or am I reading the
 results incorrectly?
 
 Close but not quite. What stands out most is:
 
 Memory latencies in nanoseconds - smaller is better
 (WARNING - may not be correct, check graphs)
 --
 Host OS   Mhz   L1 $   L2 $Main memRand memGuesses
 - -   ---      ---
 tqm8xxLinux 2.6.33-66   31.8  141.0   184.0  1165.7
 tqm8xxLinux 2.6.33-66   31.8  141.2   184.2  1165.3
 tqm8xxLinux 2.6.33-66   31.8  141.3   184.3  1165.6
 tqm8xxLinux 2.6.33-66   31.8  141.3   184.2  1166.2
 
 tqm8xxLinux 2.6.33-66   31.8  141.0   171.8  1100.5No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  141.0   171.8  1102.5No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  141.0   171.8  1101.7No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  141.0   171.8  1101.6No L2 
 cache?
 
 tqm8xxLinux 2.6.33-66   31.8  141.1   173.4  1149.1No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  141.1   173.4  1149.0No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  141.1   173.4  1148.7No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  141.1   173.4  1148.2No L2 
 cache?
 
 tqm8xxLinux 2.6.33-66   31.8  171.1   171.7  1099.8No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  171.1   171.6  1100.5No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.7  171.0   171.7  1101.0No L2 
 cache?
 tqm8xxLinux 2.6.33-66   31.8  171.0   171.6  1101.3No L2 
 cache?
 
 
 Besides the numbers, note how the first group doesn't have a Guesses entry.
 Is there something odd with the results for the first group?

Hmm.. just to be safe, I made this test again, but it shows also no entry in
Guesses ... Hardware, Linux Source, rootFS, lmbench sources, all the
same ...

 Also, since you are using MODULES, patch 2 is nullified.
 Patch 1 is very minor and should not show I think.
 This leaves patches 3  4.
 There appears to be something funny with patch 3,Don't touch ACCESSED when no 
 SWAP, as
 it yields bad numbers for Prot Fault so perhaps I am missing something that 
 needs ACCESSED
 even if NO_SWAP. Perhaps a someone that knows MM in Linux knows?
 Is there any messages in the kernel log(dmesg)?

I couldn;t find something in the output with dmesg ... but if you
want this output, I can send it to you.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-03 Thread Heiko Schocher
Hello Joakim,

I tried your 4 patches on a MPC855M based system:

-bash-3.2# cat /proc/cpuinfo
processor   : 0
cpu : 8xx
clock   : 66.00MHz
revision: 0.0 (pvr 0050 )
bogomips: 8.25
timebase: 4125000
platform: TQM8xx
model   : TQM8xx
Memory  : 32 MB
-bash-3.2# cat /proc/version
Linux version 2.6.33-rc6-01500-gbddcb41-dirty (h...@xpert.denx.de) (gcc version 
4.2.2) #9 Tue Mar 2 18:08:49 CET 2010
-bash-3.2#

First I looked for the Boottime:

Booting Linux:

2.6.33 
2.6.33tunned
... until Freeing unused kernel memory message (= enter user space)   ~4s
~4s
... until login: message (= full multi-user mode) 56s
56s

and I did a Performance test with lmbench, see:
http://sourceforge.net/projects/lmbench

Here the results:
(The first 4 rows are the results for the kernel without your patches,
 the next 4 rows are the results for the kernel with your patches)

make[1]: Entering directory `/home/hs/lmbench-3.0-a9/results'

 L M B E N C H  3 . 0   S U M M A R Y
 
 (Alpha software, do not distribute)

Basic system parameters
--
Host OS Description  Mhz  tlb  cache  mem   scal
 pages line   par   load
   bytes
- - ---  - - -- 
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   66 716 1.04001
tqm8xxLinux 2.6.33-   powerpc-linux-gnu   663216 1.04001

Processor, Processes - times in microseconds - smaller is better
--
Host OS  Mhz null null  open slct sig  sig  fork exec sh
 call  I/O stat clos TCP  inst hndl proc proc proc
- -           
tqm8xxLinux 2.6.33-   66 2.97 10.3 129. 1377 272. 21.8 91.3 6949 29.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.5 124. 1375 273. 21.8 91.3 7136 30.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.6 129. 1365 272. 21.2 96.6 6889 29.K 89.K
tqm8xxLinux 2.6.33-   66 3.06 10.5 124. 1309 272. 21.8 101. 6896 29.K 89.K
tqm8xxLinux 2.6.33-   66 2.97 8.86 126. 1336 273. 21.7 84.2 6785 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.06 8.90 130. 1343 263. 21.3 84.7 7080 29.K 88.K
tqm8xxLinux 2.6.33-   66 3.52 8.97 129. 1339 270. 22.4 84.4 6823 29.K 88.K
tqm8xxLinux 2.6.33-   66 2.97 8.99 127. 1333 261. 22.4 87.0 7037 29.K 87.K

Basic integer operations - times in nanoseconds - smaller is better
---
Host OS  intgr intgr  intgr  intgr  intgr
  bit   addmuldivmod
- - -- -- -- -- --
tqm8xxLinux 2.6.33-   15.7   18.0 1.5600  124.2  203.1
tqm8xxLinux 2.6.33-   15.7   17.4 1.5800  121.1  202.8
tqm8xxLinux 2.6.33-   15.2   17.9 1.6200  124.2  202.7
tqm8xxLinux 2.6.33-   15.2   17.9 1.6000  125.0  204.0
tqm8xxLinux 2.6.33-   15.7   18.1 1.5600  124.7  204.4
tqm8xxLinux 2.6.33-   15.7   18.1 1.5800  124.2  202.8
tqm8xxLinux 2.6.33-   15.7   17.9 1.5500  124.2  203.2
tqm8xxLinux 2.6.33-   15.7   18.1 1.5500  124.5  202.0

Basic uint64 operations - times in nanoseconds - smaller is better
--
Host OS int64  int64  int64  int64  int64
 bitaddmuldivmod
- - -- -- -- -- --
tqm8xxLinux 2.6.33-15.  13.3 1952.2 1838.2
tqm8xxLinux 2.6.33-15.  13.2 1951.5 1837.8
tqm8xxLinux 2.6.33-15.  13.2 1886.7 1907.8
tqm8xxLinux 2.6.33-15.  13.2 1951.5 1838.2
tqm8xxLinux 2.6.33-15.  13.3 1887.0 1902.2
tqm8xxLinux 2.6.33-15.  13.3 1887.4 1901.5
tqm8xxLinux 2.6.33-15.  13.3 1886.7 1893.0
tqm8xxLinux 2.6.33-15.  13.3 1950.0 1900.4

Basic float operations - times in nanoseconds - smaller is better
-
Host   

Re: [PATCH 0/4] 8xx: Optimize TLB Miss code.

2010-03-03 Thread Heiko Schocher
Hello Joakim,

Joakim Tjernlund wrote:
 Heiko Schocher h...@denx.de wrote on 2010/03/03 09:02:47:
[...]
 Here the results:
 (The first 4 rows are the results for the kernel without your patches,
  the next 4 rows are the results for the kernel with your patches)

 make[1]: Entering directory `/home/hs/lmbench-3.0-a9/results'
 
 I see both ups and downs in this test, don't quite understand why.
 What is your config w.r.t SWAP, MODULES, CPU6 and CPU15?

Sorry, forgot to say, where to find the sources. You can find them
here:

http://git.denx.de/?p=linux-2.6-denx.git;a=shortlog;h=refs/heads/tqm8xx

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v3] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-10-08 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Wed, Oct 07, 2009 at 08:40:37AM +0200, Heiko Schocher wrote:
 - serial Console on PSC1
 - 64MB SDRAM
 - MTD CFI Flash
 - Ethernet FEC
 - IDE support

 Signed-off-by: Heiko Schocher h...@denx.de
 
 Sorry for finding things incrementally, but I think there is still one issue
 left. Once this is sorted out, you could add my:

No problem, thanks for finding it!

 Reviewed-by: Wolfram Sang w.s...@pengutronix.de

OK, added, send patches soon.

thanks
bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v4] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-10-08 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
Reviewed-by: Wolfram Sang w.s...@pengutronix.de
---

- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:
$ ./scripts/checkpatch.pl 
0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch
total: 0 errors, 0 warnings, 360 lines checked

0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch has no obvious 
style problems and is ready for submission.
$

changes since v1:

- add comments from Grant Likely grant.lik...@secretlab.ca
  use mpc5200_defconfig as default configuration, therefore added
  SIMPLE_GPIO support in it, because this is not selectable as a
  module.
- add comments from Wolfram Sang w.s...@pengutronix.de
- rebase against current next

changes since v2:
- add comment from Wolfram Sang
  remove unofficial binding

changes since v3:
- add comment from Wolfram Sang
  use fsl,mpc5200b-immr only
  added Reviewed-by: Wolfram Sang w.s...@pengutronix.de

 arch/powerpc/boot/dts/mucmc52.dts|  345 ++
 arch/powerpc/configs/mpc5200_defconfig   |2 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 3 files changed, 347 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mucmc52.dts

diff --git a/arch/powerpc/boot/dts/mucmc52.dts 
b/arch/powerpc/boot/dts/mucmc52.dts
new file mode 100644
index 000..7b29d76
--- /dev/null
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -0,0 +1,345 @@
+/*
+ * mucmc52 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = manroland,mucmc52;
+   compatible = manroland,mucmc52;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt0: ti...@600 {   // GPT 0 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpt1: ti...@610 {   // GPT 1 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // GPT 2 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller

[PATCH v3] mpc5200: support for the MAN mpc5200 based board uc101

2009-10-07 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- I2C with PCF8563 and Temp. Sensor ADM9240
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---

- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:
$ ./scripts/checkpatch.pl 
0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch
total: 0 errors, 0 warnings, 317 lines checked

0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch has no obvious 
style problems and is ready for submission.
$

changes since v1:

- add comments from Grant Likely grant.lik...@secretlab.ca
  use mpc5200_defconfig as default configuration
- add comments from Wolfram Sang w.s...@pengutronix.de
- rebase against current next

changes since v2:
- add comment from Wolfram Sang
  remove unofficial binding

 arch/powerpc/boot/dts/uc101.dts  |  310 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 311 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/uc101.dts

diff --git a/arch/powerpc/boot/dts/uc101.dts b/arch/powerpc/boot/dts/uc101.dts
new file mode 100644
index 000..bfb8dd9
--- /dev/null
+++ b/arch/powerpc/boot/dts/uc101.dts
@@ -0,0 +1,310 @@
+/*
+ * uc101 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = manroland,uc101;
+   compatible = manroland,uc101;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr,
+   fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt0: ti...@600 {   // GPT 0 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpt1: ti...@610 {   // GPT 1 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // GPT 2 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller;
+   };
+
+   gpt3: ti...@630 {   // GPT 3 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg

[PATCH v3] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-10-07 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---

- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:
$ ./scripts/checkpatch.pl 
0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch
total: 0 errors, 0 warnings, 361 lines checked

0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch has no obvious 
style problems and is ready for submission.
$

changes since v1:

- add comments from Grant Likely grant.lik...@secretlab.ca
  use mpc5200_defconfig as default configuration, therefore added
  SIMPLE_GPIO support in it, because this is not selectable as a
  module.
- add comments from Wolfram Sang w.s...@pengutronix.de
- rebase against current next

changes since v2:
- add comment from Wolfram Sang
  remove unofficial binding

 arch/powerpc/boot/dts/mucmc52.dts|  346 ++
 arch/powerpc/configs/mpc5200_defconfig   |2 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 3 files changed, 348 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mucmc52.dts

diff --git a/arch/powerpc/boot/dts/mucmc52.dts 
b/arch/powerpc/boot/dts/mucmc52.dts
new file mode 100644
index 000..3924811
--- /dev/null
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -0,0 +1,346 @@
+/*
+ * mucmc52 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = manroland,mucmc52;
+   compatible = manroland,mucmc52;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr,
+   fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt0: ti...@600 {   // GPT 0 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpt1: ti...@610 {   // GPT 1 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // GPT 2 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller;
+   };
+
+   gpt3: ti...@630 {   // GPT 3 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio

Re: [PATCH, RFC] powerpc, pci: fix MODPOST warning

2009-10-05 Thread Heiko Schocher
Hello,

Heiko Schocher wrote:
 making a powerpc target with PCI support, shows the
 following warning:
 
   MODPOST vmlinux.o
 WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the 
 function pcibios_allocate_bus_resources() to the function 
 .init.text:reparent_resources()
 The function pcibios_allocate_bus_resources() references
 the function __init reparent_resources().
 This is often because pcibios_allocate_bus_resources lacks a __init
 annotation or the annotation of reparent_resources is wrong.
 
 This patch fix this warning by removing the __init
 annotation before reparent_resources.

No comments? So, is this fix OK, or unusable?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2] mpc5200: support for the MAN mpc5200 based board uc101

2009-10-05 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---
- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:
$ ./scripts/checkpatch.pl 
0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch
total: 0 errors, 0 warnings, 324 lines checked

0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch has no obvious 
style problems and is ready for submission.
$

changes since v1:

- add comments from Grant Likely grant.lik...@secretlab.ca
  use mpc5200_defconfig as default configuration
- add comments from Wolfram Sang w.s...@pengutronix.de
- rebase against current next

 arch/powerpc/boot/dts/uc101.dts  |  317 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 2 files changed, 318 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/uc101.dts

diff --git a/arch/powerpc/boot/dts/uc101.dts b/arch/powerpc/boot/dts/uc101.dts
new file mode 100644
index 000..9d79e48
--- /dev/null
+++ b/arch/powerpc/boot/dts/uc101.dts
@@ -0,0 +1,317 @@
+/*
+ * uc101 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = manroland,uc101;
+   compatible = manroland,uc101;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr,
+   fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt0: ti...@600 {   // GPT 0 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpt1: ti...@610 {   // GPT 1 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // GPT 2 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller;
+   };
+
+   gpt3: ti...@630 {   // GPT 3 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x630 0x10;
+   interrupts = 1 12 0;
+   gpio-controller

[PATCH v2] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-10-05 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---
- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:
$ ./scripts/checkpatch.pl 
0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch
total: 0 errors, 0 warnings, 368 lines checked

0002-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch has no obvious 
style problems and is ready for submission.
$

changes since v1:

- add comments from Grant Likely grant.lik...@secretlab.ca
  use mpc5200_defconfig as default configuration, therefore added
  SIMPLE_GPIO support in it, because this is not selectable as a
  module.
- add comments from Wolfram Sang w.s...@pengutronix.de
- rebase against current next

 arch/powerpc/boot/dts/mucmc52.dts|  353 ++
 arch/powerpc/configs/mpc5200_defconfig   |2 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 3 files changed, 355 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mucmc52.dts

diff --git a/arch/powerpc/boot/dts/mucmc52.dts 
b/arch/powerpc/boot/dts/mucmc52.dts
new file mode 100644
index 000..88ad3e7
--- /dev/null
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -0,0 +1,353 @@
+/*
+ * mucmc52 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = manroland,mucmc52;
+   compatible = manroland,mucmc52;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr,
+   fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt0: ti...@600 {   // GPT 0 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpt1: ti...@610 {   // GPT 1 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // GPT 2 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio-cells = 2;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller;
+   };
+
+   gpt3: ti...@630 {   // GPT 3 in GPIO mode
+   compatible = fsl,mpc5200b-gpt-gpio,
+   fsl,mpc5200-gpt-gpio;
+   #gpio

Re: [PATCH v2] mpc5200: support for the MAN mpc5200 based board uc101

2009-10-05 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 On Mon, Oct 05, 2009 at 09:46:43AM +0200, Heiko Schocher wrote:
 
 - serial Console on PSC1
 - 64MB SDRAM
 - MTD CFI Flash
 - Ethernet FEC
 - IDE support

 Signed-off-by: Heiko Schocher h...@denx.de
[...]
 [...]
 +wdt {
 +compatible = generic,gpio-wdt;
 +reg = 0x600 0x10;
 +gpios = gpt0 0 0;
 +period = 500; // WDT trigger period in msec
 +};
 
 Is this an official binding? I also did an gpio-watchdog a while ago and there
 were some issues with the binding, IIRC. Would be nice if this has been solved
 meanwhile.

Oh, sorry, no. I remove it.

 Other than that, it looks okay to me.

Ok, thanks for reviewing, I resent soon an update

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] mpc5200: support for the MAN mpc5200 based board uc101

2009-10-05 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Mon, Oct 5, 2009 at 4:12 AM, Heiko Schocher h...@denx.de wrote:
 Wolfram Sang wrote:
 Is this an official binding? I also did an gpio-watchdog a while ago and 
 there
 were some issues with the binding, IIRC. Would be nice if this has been 
 solved
 meanwhile.
 Oh, sorry, no. I remove it.
 
 You don't need to remove it, but choose a compatible value within the
 board/manufacturer namespace.  ie. 'manroland,uc101-watchdog'.  You

Hmm.. currently I prefer to remove it, because it is not a uc101 special
wdt driver. When this wdt driver go in mainline, it is easy to readd it
to this board support.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-09-14 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- I2C with PCF8563 and Temp. Sensor ADM9240
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---
- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:

$ ./scripts/checkpatch.pl 
0001-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch
total: 0 errors, 0 warnings, 1714 lines checked

0001-mpc5200-support-for-the-MAN-mpc5200-based-board-muc.patch has no obvious 
style problems and is ready for submission.
$

 arch/powerpc/boot/dts/mucmc52.dts|  231 
 arch/powerpc/configs/52xx/mucmc52_defconfig  | 1476 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 3 files changed, 1708 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mucmc52.dts
 create mode 100644 arch/powerpc/configs/52xx/mucmc52_defconfig

diff --git a/arch/powerpc/boot/dts/mucmc52.dts 
b/arch/powerpc/boot/dts/mucmc52.dts
new file mode 100644
index 000..a4a7a20
--- /dev/null
+++ b/arch/powerpc/boot/dts/mucmc52.dts
@@ -0,0 +1,231 @@
+/*
+ * mucmc52 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = man,mucmc52;
+   compatible = man,mucmc52;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   };
+
+   ti...@600 { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   gpio-controller;
+   };
+
+   gpio_simple: g...@b00 {
+   compatible = fsl,mpc5200-gpio;
+   reg = 0xb00 0x40;
+   interrupts = 1 7 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   dma-control...@1200 {
+   device_type = dma-controller;
+   compatible = fsl,mpc5200-bestcomm;
+   reg = 0x1200 0x80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 10 0  3 11 0
+ 3 12 0  3 13 0  3 14 0  3 15 0;
+   };
+
+   x...@1f00 {
+   compatible = fsl,mpc5200-xlb;
+   reg = 0x1f00 0x100;
+   };
+
+   ser...@2000 {   // PSC1
+   compatible = fsl,mpc5200-psc-uart;
+   reg = 0x2000 0x100;
+   interrupts = 2 1 0;
+   };
+
+   ser...@2200 {   // PSC2
+   compatible = fsl,mpc5200-psc-uart;
+   reg = 0x2200 0x100;
+   interrupts = 2 2 0;
+   };
+
+   ser...@2c00 {   // PSC6

[PATCH] mpc5200: support for the MAN mpc5200 based board uc101

2009-09-14 Thread Heiko Schocher
- serial Console on PSC1
- 64MB SDRAM
- MTD CFI Flash
- Ethernet FEC
- I2C with PCF8563 and Temp. Sensor ADM9240
- IDE support

Signed-off-by: Heiko Schocher h...@denx.de
---
- based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

- checked with:

$ ./scripts/checkpatch.pl 
0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch
total: 0 errors, 0 warnings, 1622 lines checked

0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch has no obvious 
style problems and is ready for submission.
$

 arch/powerpc/boot/dts/uc101.dts  |  312 ++
 arch/powerpc/configs/52xx/uc101_defconfig| 1303 ++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 3 files changed, 1616 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/uc101.dts
 create mode 100644 arch/powerpc/configs/52xx/uc101_defconfig

diff --git a/arch/powerpc/boot/dts/uc101.dts b/arch/powerpc/boot/dts/uc101.dts
new file mode 100644
index 000..28e1c90
--- /dev/null
+++ b/arch/powerpc/boot/dts/uc101.dts
@@ -0,0 +1,312 @@
+/*
+ * uc101 board Device Tree Source
+ *
+ * Copyright (C) 2009 DENX Software Engineering GmbH
+ * Heiko Schocher h...@denx.de
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+   model = man,uc101;
+   compatible = man,uc101;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = mpc5200_pic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5...@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;// L1, 16K
+   i-cache-size = 0x4000;// L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x0400;  // 64MB
+   };
+
+   soc5...@f000 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   c...@200 {
+   compatible = fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: interrupt-control...@500 {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   interrupts = 0 0 3;
+   };
+
+   gpt1: ti...@610 {   // General Purpose Timer 1 in GPIO mode
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   gpio-controller;
+   };
+
+   gpt2: ti...@620 {   // General Purpose Timer 2 in GPIO mode
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   gpio-controller;
+   };
+
+   gpt3: ti...@630 {   // General Purpose Timer 3 in GPIO mode
+   compatible = 
fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
+   reg = 0x630 0x10;
+   interrupts = 1 12 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpio_simple: g...@b00 {
+   compatible = fsl,mpc5200-gpio;
+   reg = 0xb00 0x40;
+   interrupts = 1 7 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   gpio_wkup: g...@c00 {
+   compatible = fsl,mpc5200-gpio-wkup;
+   reg = 0xc00 0x40;
+   interrupts = 1 8 0 0 3 0;
+   gpio-controller;
+   #gpio-cells = 2;
+   };
+
+   dma-control...@1200 {
+   device_type = dma

Re: [PATCH] mpc5200: support for the MAN mpc5200 based board uc101

2009-09-14 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 Thanks for the patch.  Comments below.
 
 g.
 
 On Mon, Sep 14, 2009 at 2:05 AM, Heiko Schocher h...@denx.de wrote:
 - serial Console on PSC1
 - 64MB SDRAM
 - MTD CFI Flash
 - Ethernet FEC
 - I2C with PCF8563 and Temp. Sensor ADM9240
 - IDE support

 Signed-off-by: Heiko Schocher h...@denx.de
 ---
 - based on:
  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

 - checked with:

 $ ./scripts/checkpatch.pl 
 0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch
 total: 0 errors, 0 warnings, 1622 lines checked

 0001-mpc5200-support-for-the-MAN-mpc5200-based-board-uc1.patch has no 
 obvious style problems and is ready for submission.
 $

  arch/powerpc/boot/dts/uc101.dts  |  312 ++
  arch/powerpc/configs/52xx/uc101_defconfig| 1303 
 ++
 
 I generally don't like board specific defconfigs unless there is a
 really compelling reason why it should be in the kernel tree.  Please
 add the stuff you need (as modules!) to mpc5200_defconfig.

OK, thanks for spotting this. I take a look how this works.

 g.
 
 diff --git a/arch/powerpc/boot/dts/uc101.dts 
 b/arch/powerpc/boot/dts/uc101.dts
 new file mode 100644
 index 000..28e1c90
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/uc101.dts
 @@ -0,0 +1,312 @@
 +/*
 + * uc101 board Device Tree Source
 + *
 + * Copyright (C) 2009 DENX Software Engineering GmbH
 + * Heiko Schocher h...@denx.de
 + *
 + * 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.
 + */
 +
 +/dts-v1/;
 +
 +/ {
 +   model = man,uc101;
 +   compatible = man,uc101;
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   interrupt-parent = mpc5200_pic;
 +
 +   cpus {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +
 +   PowerPC,5...@0 {
 +   device_type = cpu;
 +   reg = 0;
 +   d-cache-line-size = 32;
 +   i-cache-line-size = 32;
 +   d-cache-size = 0x4000;// L1, 16K
 +   i-cache-size = 0x4000;// L1, 16K
 +   timebase-frequency = 0;   // from bootloader
 +   bus-frequency = 0;// from bootloader
 +   clock-frequency = 0;  // from bootloader
 +   };
 +   };
 +
 +   memory {
 +   device_type = memory;
 +   reg = 0x 0x0400;  // 64MB
 +   };
 +
 +   soc5...@f000 {
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   compatible = fsl,mpc5200-immr;
 +   ranges = 0 0xf000 0xc000;
 +   reg = 0xf000 0x0100;
 +   bus-frequency = 0;// from bootloader
 +   system-frequency = 0; // from bootloader
 +
 +   c...@200 {
 +   compatible = fsl,mpc5200-cdm;
 +   reg = 0x200 0x38;
 +   };
 +
 +   mpc5200_pic: interrupt-control...@500 {
 +   // 5200 interrupts are encoded into two levels;
 +   interrupt-controller;
 +   #interrupt-cells = 3;
 +   compatible = fsl,mpc5200-pic;
 +   reg = 0x500 0x80;
 +   interrupts = 0 0 3;
 +   };
 +
 +   gpt1: ti...@610 {   // General Purpose Timer 1 in GPIO 
 mode
 +   compatible = 
 fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
 +   reg = 0x610 0x10;
 +   interrupts = 1 10 0;
 +   gpio-controller;
 +   };
 +
 +   gpt2: ti...@620 {   // General Purpose Timer 2 in GPIO 
 mode
 +   compatible = 
 fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
 +   reg = 0x620 0x10;
 +   interrupts = 1 11 0;
 +   gpio-controller;
 +   };
 +
 +   gpt3: ti...@630 {   // General Purpose Timer 3 in GPIO 
 mode
 +   compatible = 
 fsl,mpc5200b-gpt-gpio,fsl,mpc5200-gpt-gpio;
 +   reg = 0x630 0x10;
 +   interrupts = 1 12 0;
 +   gpio-controller;
 +   #gpio-cells = 2;
 +   };
 +
 +   gpio_simple: g...@b00 {
 +   compatible = fsl,mpc5200-gpio;
 +   reg = 0xb00 0x40;
 +   interrupts = 1 7 0;
 +   gpio-controller;
 +   #gpio-cells = 2;
 +   };
 +
 +   gpio_wkup: g...@c00

Re: [PATCH] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-09-14 Thread Heiko Schocher
Hello Wolfram,

Wolfram Sang wrote:
 Hi,
 
 +mpc5200_pic: interrupt-control...@500 {
 +// 5200 interrupts are encoded into two levels;
 
 Grant, maybe this comment could be dropped also for the in-kernel dts-files? I
 think it is sufficently described in mpc5200.txt. I could prepare a patch if
 you agree.
 
 +i...@3d40 {
 +#address-cells = 1;
 +#size-cells = 0;
 +compatible = fsl,mpc5200-i2c,fsl-i2c;
 +reg = 0x3d40 0x40;
 +interrupts = 2 16 0;
 +fsl5200-clocking;
 
 Please drop the clocking-line. It became obsolete.

OK, I fix this.

Thanks for reviewing

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] mpc5200: support for the MAN mpc5200 based board mucmc52

2009-09-14 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 Comments below.
 
 On Mon, Sep 14, 2009 at 2:05 AM, Heiko Schocher h...@denx.de wrote:
 - serial Console on PSC1
 - 64MB SDRAM
 - MTD CFI Flash
 - Ethernet FEC
 - I2C with PCF8563 and Temp. Sensor ADM9240
 - IDE support

 Signed-off-by: Heiko Schocher h...@denx.de

  arch/powerpc/boot/dts/mucmc52.dts|  231 
  arch/powerpc/configs/52xx/mucmc52_defconfig  | 1476 
 ++
 
 Same comment as on your other patch.  Drop the defconfig and add the
 needed bits to mpc5200_defconfig (in a separate patch, and add drivers
 as modules).

Yep, thanks. I look, how this works.

 diff --git a/arch/powerpc/boot/dts/mucmc52.dts 
 b/arch/powerpc/boot/dts/mucmc52.dts
 new file mode 100644
 index 000..a4a7a20
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/mucmc52.dts
 @@ -0,0 +1,231 @@
 +/*
 + * mucmc52 board Device Tree Source
 + *
 + * Copyright (C) 2009 DENX Software Engineering GmbH
 + * Heiko Schocher h...@denx.de
 + *
 + * 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.
 + */
 +
 +/dts-v1/;
 +
 +/ {
 +   model = man,mucmc52;
 +   compatible = man,mucmc52;
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   interrupt-parent = mpc5200_pic;
 +
 +   cpus {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +
 +   PowerPC,5...@0 {
 +   device_type = cpu;
 +   reg = 0;
 +   d-cache-line-size = 32;
 +   i-cache-line-size = 32;
 +   d-cache-size = 0x4000;// L1, 16K
 +   i-cache-size = 0x4000;// L1, 16K
 +   timebase-frequency = 0;   // from bootloader
 +   bus-frequency = 0;// from bootloader
 +   clock-frequency = 0;  // from bootloader
 +   };
 +   };
 +
 +   memory {
 +   device_type = memory;
 +   reg = 0x 0x0400;  // 64MB
 +   };
 +
 +   soc5...@f000 {
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   compatible = fsl,mpc5200-immr;
 
 Does this board use the older and rarer non-'B' mpc5200 part?  If not,
 then fsl,mpc5200b-immr also needs to be in this list.

OK, I add this too

Thanks

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] mpc5200: support for the MAN mpc5200 based board uc101

2009-09-14 Thread Heiko Schocher
Hello Wolfgang,

Wolfgang Grandegger wrote:
 Heiko Schocher wrote:
 Hello Grant,

 Grant Likely wrote:
 Thanks for the patch.  Comments below.

 g.

 On Mon, Sep 14, 2009 at 2:05 AM, Heiko Schocher h...@denx.de wrote:
 - serial Console on PSC1
 - 64MB SDRAM
 - MTD CFI Flash
 - Ethernet FEC
 - I2C with PCF8563 and Temp. Sensor ADM9240
 - IDE support

 Signed-off-by: Heiko Schocher h...@denx.de
 ...snip
 
 +   i...@3d40 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = fsl,mpc5200-i2c,fsl-i2c;
 +   reg = 0x3d40 0x40;
 +   interrupts = 2 16 0;
 +   fsl5200-clocking;
 I believe fsl5200-clocking is no longer required.  There is a patch
 pending which removes this property from the other .dts files.
 
 Right, it obsolete.

OK, I remove it.

 Ok, fix this.
 
 Like it is, the I2C controller will use a fixed low speed fdt/dfsr
 setting. You have two other options:
 
   fsl,preserve-clocking;
   clock-frequency = 40;
 
 See also
 http://lxr.linux.no/#linux+v2.6.31/Documentation/powerpc/dts-bindings/fsl/i2c.txt.

Ah, ok, thanks for this info. I try this ...

 +
 +   hw...@2c {
 +   compatible = ad,adm9240;
 +   reg = 0x2c;
 +   };
 +   r...@51 {
 +   compatible = rtc,pcf8563;
 
 rtc is not a proper vendor name. Should be nxp, IIRC.

OK, fix it.

Thanks for reviewing

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


832x: MATH_EMUL

2009-08-21 Thread Heiko Schocher
Hello,

I actually porting a mpc8321 based port, and because there is no FPU
on this CPU, I activated MATH_EMUL, as all other mpc832x ports did.

Is there something like a counter, which counts how many times this
Exception occurs?

Thanks.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: 832x: MATH_EMUL

2009-08-21 Thread Heiko Schocher
Hello Geert,

Geert Uytterhoeven wrote:
 On Fri, 21 Aug 2009, Kumar Gala wrote:
 On Aug 21, 2009, at 1:39 AM, Heiko Schocher wrote:
 I actually porting a mpc8321 based port, and because there is no FPU
 on this CPU, I activated MATH_EMUL, as all other mpc832x ports did.

 Is there something like a counter, which counts how many times this
 Exception occurs?
 Geert published some patches that did something like this but there isn't
 upstream as far as I know at this point.
 
 It's upstream: 80947e7c99c29ce3a78bdc1933b310468455a82f

Thanks for this info!

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: simple gpio driver

2009-08-17 Thread Heiko Schocher
Hello Grant,

Grant Likely wrote:
 On Wed, Aug 12, 2009 at 11:49 PM, Heiko Schocherh...@denx.de wrote:
 Hello Anton,

 i am trying to use the arch/powerpc/sysdev/simple_gpio.c driver,
 for accessing some gpios, and found, that u8_gpio_get()
 returns not only a 1 or a 0, instead it returns the real bit
 position from the gpio:

 gpioreturn
 basevalue
 0   0/0x01
 1   0/0x02
 2   0/0x04
 3   0/0x08
 4   0/0x10
 5   0/0x20
 6   0/0x40
 7   0/0x80

 I also use the arch/powerpc/platforms/52xx/mpc52xx_gpio.c and
 mpc52xx_gpt.c drivers, they all return for a gpio just a 1 or 0,
 which seems correct to me, because a gpio can have only 1 or 0
 as state ... what do you think?
 
 I think returning '1' is perhaps slightly 'better' (however you define

Yep.

 that), but I don't think the caller should make any assumptions beyond
 zero/non-zero.

Hmm... why? I think a gpio_pin can have as value only 0 or 1.
Ah, if you say zero versus non zero ... hmm... okay.

 I solved this issue (if it is) with the following patch:

 diff --git a/arch/powerpc/sysdev/simple_gpio.c 
 b/arch/powerpc/sysdev/simple_gpio.c
 index 43c4569..bb0d79c 100644
 --- a/arch/powerpc/sysdev/simple_gpio.c
 +++ b/arch/powerpc/sysdev/simple_gpio.c
 @@ -46,7 +46,7 @@ static int u8_gpio_get(struct gpio_chip *gc, unsigned int 
 gpio)
  {
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);

 -   return in_8(mm_gc-regs)  u8_pin2mask(gpio);
 +   return (in_8(mm_gc-regs)  u8_pin2mask(gpio) ? 1 : 0);
 
 For clarity, the brackets should be just around the  operands, and
 != 0 instead of ? 1 : 0 might result in slightly smaller code.
 
 return (in_8(mm_gc-regs)  u8_pin2mask(gpio)) != 0;

Yep, you are right, thanks for the info.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: simple gpio driver

2009-08-17 Thread Heiko Schocher
Hello Anton,

Anton Vorontsov wrote:
 Oops, I missed that patch, sorry.
 
 On Mon, Aug 17, 2009 at 03:18:37PM -0600, Grant Likely wrote:
 On Wed, Aug 12, 2009 at 11:49 PM, Heiko Schocherh...@denx.de wrote:
 Hello Anton,

 i am trying to use the arch/powerpc/sysdev/simple_gpio.c driver,
 for accessing some gpios, and found, that u8_gpio_get()
 returns not only a 1 or a 0, instead it returns the real bit
 position from the gpio:

 gpioreturn
 basevalue
 0   0/0x01
 1   0/0x02
 2   0/0x04
 3   0/0x08
 4   0/0x10
 5   0/0x20
 6   0/0x40
 7   0/0x80

 I also use the arch/powerpc/platforms/52xx/mpc52xx_gpio.c and
 mpc52xx_gpt.c drivers, they all return for a gpio just a 1 or 0,
 
 There is also arch/powerpc/sysdev/qe_lib/gpio.c and
 arch/powerpc/sysdev/mpc8xxx_gpio.c that don't do that.

Ah, okay.

 which seems correct to me, because a gpio can have only 1 or 0
 as state ... what do you think?
 I think returning '1' is perhaps slightly 'better' (however you define
 that), but I don't think the caller should make any assumptions beyond
 zero/non-zero.
 
 Yep. So I don't think that the patch is needed.

Yes, if the gpio lib only differs in zero versus non zero.

Thanks for the info

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


simple gpio driver

2009-08-12 Thread Heiko Schocher
Hello Anton,

i am trying to use the arch/powerpc/sysdev/simple_gpio.c driver,
for accessing some gpios, and found, that u8_gpio_get()
returns not only a 1 or a 0, instead it returns the real bit
position from the gpio:

gpioreturn
basevalue
0   0/0x01
1   0/0x02
2   0/0x04
3   0/0x08
4   0/0x10
5   0/0x20
6   0/0x40
7   0/0x80

I also use the arch/powerpc/platforms/52xx/mpc52xx_gpio.c and
mpc52xx_gpt.c drivers, they all return for a gpio just a 1 or 0,
which seems correct to me, because a gpio can have only 1 or 0
as state ... what do you think?

I solved this issue (if it is) with the following patch:

diff --git a/arch/powerpc/sysdev/simple_gpio.c 
b/arch/powerpc/sysdev/simple_gpio.c
index 43c4569..bb0d79c 100644
--- a/arch/powerpc/sysdev/simple_gpio.c
+++ b/arch/powerpc/sysdev/simple_gpio.c
@@ -46,7 +46,7 @@ static int u8_gpio_get(struct gpio_chip *gc, unsigned int 
gpio)
 {
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);

-   return in_8(mm_gc-regs)  u8_pin2mask(gpio);
+   return (in_8(mm_gc-regs)  u8_pin2mask(gpio) ? 1 : 0);
 }

 static void u8_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v3 2/2] 82xx, mgcoge: update defconfig for 2.6.32

2009-08-07 Thread Heiko Schocher
- add I2C support
- add FCC1 and FCC2 support

Signed-off-by: Heiko Schocher h...@denx.de
---
- against git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0001-82xx-mgcoge-update-defconfig-for-2.6.32.patch
total: 0 errors, 0 warnings, 134 lines checked

0001-82xx-mgcoge-update-defconfig-for-2.6.32.patch has no obvious style 
problems and is ready for submission.
$

- changes since v1
  - Add comments from David Gibson
removed 2 device_type entries
  - Add comment from Kumar Gala
splittet into 2 patches (seperated defconfig patch)
- changes since v2
  - based against kumars tree, next branch

 arch/powerpc/configs/mgcoge_defconfig |   86 ++--
 1 files changed, 80 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
index e9491c1..30b68bf 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.31-rc4
-# Wed Jul 29 23:31:51 2009
+# Linux kernel version: 2.6.31-rc5
+# Fri Aug  7 08:19:15 2009
 #
 # CONFIG_PPC64 is not set

@@ -158,6 +158,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_MODULES is not set
 CONFIG_BLOCK=y
 CONFIG_LBDAF=y
+CONFIG_BLK_DEV_BSG=y
 # CONFIG_BLK_DEV_INTEGRITY is not set

 #
@@ -506,6 +507,7 @@ CONFIG_MTD_PHYSMAP_OF=y
 # CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 CONFIG_OF_GPIO=y
+CONFIG_OF_I2C=y
 CONFIG_OF_MDIO=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
@@ -582,7 +584,8 @@ CONFIG_PHYLIB=y
 # CONFIG_STE10XP is not set
 # CONFIG_LSI_ET1011C_PHY is not set
 CONFIG_FIXED_PHY=y
-# CONFIG_MDIO_BITBANG is not set
+CONFIG_MDIO_BITBANG=y
+# CONFIG_MDIO_GPIO is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_MACE is not set
@@ -608,8 +611,8 @@ CONFIG_MII=y
 # CONFIG_ATL2 is not set
 CONFIG_FS_ENET=y
 CONFIG_FS_ENET_HAS_SCC=y
-# CONFIG_FS_ENET_HAS_FCC is not set
-# CONFIG_FS_ENET_MDIO_FCC is not set
+CONFIG_FS_ENET_HAS_FCC=y
+CONFIG_FS_ENET_MDIO_FCC=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_1 is not set
 # CONFIG_TR is not set
@@ -680,7 +683,68 @@ CONFIG_HW_RANDOM=y
 # CONFIG_APPLICOM is not set
 # CONFIG_RAW_DRIVER is not set
 CONFIG_DEVPORT=y
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_ISCH is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIAPRO is not set
+
+#
+# Mac SMBus host controller drivers
+#
+# CONFIG_I2C_POWERMAC is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_CPM=y
+# CONFIG_I2C_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_MPC is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_PCF8575 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set

 #
@@ -699,6 +763,9 @@ CONFIG_GPIOLIB=y
 #
 # I2C GPIO expanders:
 #
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set

 #
 # PCI GPIO expanders:
@@ -727,7 +794,14 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_AB3100_CORE is not set
 # CONFIG_REGULATOR is not set
 # CONFIG_MEDIA_SUPPORT is not set

-- 
1.6.0.6

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 2/2] 82xx, mgcoge: update defconfig for 2.6.32

2009-08-06 Thread Heiko Schocher
Hello Kumar,

Kumar Gala wrote:
 On Aug 3, 2009, at 2:35 AM, Heiko Schocher wrote:
 
 - add I2C support
 - add FCC1 and FCC2 support

 Signed-off-by: Heiko Schocher h...@denx.de
 ---
 - against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
 - checked with checkpatch.pl:
 $ ./scripts/checkpatch.pl
 0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch
 total: 0 errors, 0 warnings, 381 lines checked
 
 I had problems applying this to my 'next' branch

Ups, Sorry, I based this patchset against:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  

I make a patch against your next branch ...

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2 1/2] 82xx, mgcoge: updates for 2.6.32

2009-08-03 Thread Heiko Schocher
[PATCH v2 1/2] 82xx, mgcoge: updates for 2.6.32

- add I2C support
- add FCC1 and FCC2 support
- fix bogus gpio numbering in plattformcode

Signed-off-by: Heiko Schocher h...@denx.de
---
- against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
total: 0 errors, 0 warnings, 147 lines checked

0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style problems and is 
ready for submission.
$
- changes since v1
  - Add comments from David Gibson
removed 2 device_type entries
  - Add comment from Kumar Gala
splittet into 2 patches (seperated defconfig patch)

 arch/powerpc/boot/dts/mgcoge.dts |   53 ++
 arch/powerpc/platforms/82xx/mgcoge.c |   69 +
 2 files changed, 113 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index 633255a..0ce9664 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -162,6 +162,59 @@
fixed-link = 0 0 10 0 0;
};

+   i...@11860 {
+   compatible = fsl,mpc8272-i2c,
+fsl,cpm2-i2c;
+   reg = 0x11860 0x20 0x8afc 0x2;
+   interrupts = 1 8;
+   interrupt-parent = PIC;
+   fsl,cpm-command = 0x2960;
+   #address-cells = 1;
+   #size-cells = 0;
+   };
+
+   m...@10d40 {
+   compatible = fsl,cpm2-mdio-bitbang;
+   reg = 0x10d00 0x14;
+   #address-cells = 1;
+   #size-cells = 0;
+   fsl,mdio-pin = 12;
+   fsl,mdc-pin = 13;
+
+   phy0: ethernet-...@0 {
+   reg = 0x0;
+   };
+
+   phy1: ethernet-...@1 {
+   reg = 0x1;
+   };
+   };
+
+   /* FCC1 management to switch */
+   ether...@11300 {
+   device_type = network;
+   compatible = fsl,cpm2-fcc-enet;
+   reg = 0x11300 0x20 0x8400 0x100 0x11390 0x1;
+   local-mac-address = [ 00 01 02 03 04 07 ];
+   interrupts = 32 8;
+   interrupt-parent = PIC;
+   phy-handle = phy0;
+   linux,network-index = 1;
+   fsl,cpm-command = 0x12000300;
+   };
+
+   /* FCC2 to redundant core unit over backplane */
+   ether...@11320 {
+   device_type = network;
+   compatible = fsl,cpm2-fcc-enet;
+   reg = 0x11320 0x20 0x8500 0x100 0x113b0 0x1;
+   local-mac-address = [ 00 01 02 03 04 08 ];
+   interrupts = 33 8;
+   interrupt-parent = PIC;
+   phy-handle = phy1;
+   linux,network-index = 2;
+   fsl,cpm-command = 0x16200300;
+   };
};

PIC: interrupt-control...@10c00 {
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c 
b/arch/powerpc/platforms/82xx/mgcoge.c
index c2af169..7a5de9e 100644
--- a/arch/powerpc/platforms/82xx/mgcoge.c
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -50,16 +50,63 @@ struct cpm_pin {
 static __initdata struct cpm_pin mgcoge_pins[] = {

/* SMC2 */
-   {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},

/* SCC4 */
-   {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3,  9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {3,  8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
-   {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+   {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {2,  9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {2,  8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {3, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+   {3, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+
+   /* FCC1 */
+   {0, 14

[PATCH v2 2/2] 82xx, mgcoge: update defconfig for 2.6.32

2009-08-03 Thread Heiko Schocher
- add I2C support
- add FCC1 and FCC2 support

Signed-off-by: Heiko Schocher h...@denx.de
---
- against git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch
total: 0 errors, 0 warnings, 381 lines checked

0002-82xx-mgcoge-update-defconfig-for-2.6.32.patch has no obvious style 
problems and is ready for submission.
$
- changes since v1
  - Add comments from David Gibson
removed 2 device_type entries
  - Add comment from Kumar Gala
splittet into 2 patches (seperated defconfig patch)

 arch/powerpc/configs/mgcoge_defconfig |  178 +---
 1 files changed, 139 insertions(+), 39 deletions(-)

diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
index 31e1df6..a6fe6b0 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,25 +1,27 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-rc3
-# Wed May 13 17:21:55 2009
+# Linux kernel version: 2.6.31-rc4
+# Wed Jul 29 08:57:10 2009
 #
 # CONFIG_PPC64 is not set

 #
 # Processor support
 #
-CONFIG_6xx=y
+CONFIG_PPC_BOOK3S_32=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
 # CONFIG_E200 is not set
 CONFIG_PPC_BOOK3S=y
+CONFIG_6xx=y
 CONFIG_PPC_FPU=y
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_PPC_MM_SLICES is not set
+CONFIG_PPC_HAVE_PMU_SUPPORT=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_GPIO=y
 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,6 +56,7 @@ CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
 CONFIG_GENERIC_BUG=y
+CONFIG_DTC=y
 # CONFIG_DEFAULT_UIMAGE is not set
 CONFIG_HIBERNATE_32=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
@@ -60,6 +64,7 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 # CONFIG_PPC_DCR_MMIO is not set
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y

 #
 # General setup
@@ -105,7 +110,6 @@ CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
-# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
@@ -119,8 +123,15 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+CONFIG_HAVE_PERF_COUNTERS=y
+
+#
+# Performance Counters
+#
+# CONFIG_PERF_COUNTERS is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
@@ -134,6 +145,11 @@ CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
 CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
 # CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
@@ -141,7 +157,7 @@ CONFIG_RT_MUTEXES=y
 CONFIG_BASE_SMALL=0
 # CONFIG_MODULES is not set
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_INTEGRITY is not set

 #
@@ -225,6 +241,7 @@ CONFIG_BINFMT_ELF=y
 # CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
 # CONFIG_IOMMU_HELPER is not set
+# CONFIG_SWIOTLB is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_HAS_WALK_MEMORY=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -240,9 +257,9 @@ CONFIG_MIGRATION=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
-CONFIG_UNEVICTABLE_LRU=y
 CONFIG_HAVE_MLOCK=y
 CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 CONFIG_PPC_4K_PAGES=y
 # CONFIG_PPC_16K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
@@ -313,6 +330,7 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 CONFIG_SYN_COOKIES=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
@@ -374,7 +392,11 @@ CONFIG_WIRELESS=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 # CONFIG_WIRELESS_EXT is not set
 # CONFIG_LIB80211 is not set
-# CONFIG_MAC80211 is not set
+
+#
+# CFG80211 needs to be enabled for MAC80211
+#
+CONFIG_MAC80211_DEFAULT_PS_VALUE=0
 # CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set

@@ -484,6 +506,8 @@ CONFIG_MTD_PHYSMAP_OF=y
 # CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 CONFIG_OF_GPIO=y
+CONFIG_OF_I2C=y
+CONFIG_OF_MDIO=y

82xx, mgcoge: updates for 2.6.32

2009-07-29 Thread Heiko Schocher
- add I2C support
- add FCC1 and FCC2 support
- fix bogus gpio numbering in plattformcode

Signed-off-by: Heiko Schocher h...@denx.de
---
- based on git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  next branch
- checked with checkpatch.pl:
$ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
total: 0 errors, 0 warnings, 531 lines checked

0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style problems and is 
ready for submission.
$

BTW: Who is PPC82XX Maintainer? I couldn;t find such an entry
 in the MAINTAINERS file ...

 arch/powerpc/boot/dts/mgcoge.dts  |   56 ++
 arch/powerpc/configs/mgcoge_defconfig |  178 +---
 arch/powerpc/platforms/82xx/mgcoge.c  |   69 +++--
 3 files changed, 255 insertions(+), 48 deletions(-)

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index 633255a..a2efc36 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -162,6 +162,62 @@
fixed-link = 0 0 10 0 0;
};

+   i...@11860 {
+   compatible = fsl,mpc8272-i2c,
+fsl,cpm2-i2c;
+   reg = 0x11860 0x20 0x8afc 0x2;
+   interrupts = 1 8;
+   interrupt-parent = PIC;
+   fsl,cpm-command = 0x2960;
+   #address-cells = 1;
+   #size-cells = 0;
+   };
+
+   m...@10d40 {
+   device_type = mdio;
+   compatible = fsl,cpm2-mdio-bitbang;
+   reg = 0x10d00 0x14;
+   #address-cells = 1;
+   #size-cells = 0;
+   fsl,mdio-pin = 12;
+   fsl,mdc-pin = 13;
+
+   phy0: ethernet-...@0 {
+   reg = 0x0;
+   device_type = ethernet-phy;
+   };
+
+   phy1: ethernet-...@1 {
+   reg = 0x1;
+   device_type = ethernet-phy;
+   };
+   };
+
+   /* FCC1 management to switch */
+   ether...@11300 {
+   device_type = network;
+   compatible = fsl,cpm2-fcc-enet;
+   reg = 0x11300 0x20 0x8400 0x100 0x11390 0x1;
+   local-mac-address = [ 00 01 02 03 04 07 ];
+   interrupts = 32 8;
+   interrupt-parent = PIC;
+   phy-handle = phy0;
+   linux,network-index = 1;
+   fsl,cpm-command = 0x12000300;
+   };
+
+   /* FCC2 to redundant core unit over backplane */
+   ether...@11320 {
+   device_type = network;
+   compatible = fsl,cpm2-fcc-enet;
+   reg = 0x11320 0x20 0x8500 0x100 0x113b0 0x1;
+   local-mac-address = [ 00 01 02 03 04 08 ];
+   interrupts = 33 8;
+   interrupt-parent = PIC;
+   phy-handle = phy1;
+   linux,network-index = 2;
+   fsl,cpm-command = 0x16200300;
+   };
};

PIC: interrupt-control...@10c00 {
diff --git a/arch/powerpc/configs/mgcoge_defconfig 
b/arch/powerpc/configs/mgcoge_defconfig
index 31e1df6..a6fe6b0 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,25 +1,27 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-rc3
-# Wed May 13 17:21:55 2009
+# Linux kernel version: 2.6.31-rc4
+# Wed Jul 29 08:57:10 2009
 #
 # CONFIG_PPC64 is not set

 #
 # Processor support
 #
-CONFIG_6xx=y
+CONFIG_PPC_BOOK3S_32=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
 # CONFIG_E200 is not set
 CONFIG_PPC_BOOK3S=y
+CONFIG_6xx=y
 CONFIG_PPC_FPU=y
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_PPC_MM_SLICES is not set
+CONFIG_PPC_HAVE_PMU_SUPPORT=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y

  1   2   >