Hello,
I have already done this work. On our own platform a realtime clock
which is connected via IIC is working!
Here are 2 patches. The first one is the iic driver and the second
one is for the platform device.
Please notice that I have modified the original Xilinx code a little bit
to get the realtime clock chip working. Here is a logging of what I have
changed:
commit bc536a914f13ec152932b960d57f3c294e120e67
Author: Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx>
Date: Wed Mar 5 13:49:01 2008 +0100
Fixed boot message "**WARNING** I2C adapter driver [xilinx_iic.0] forgot to specify physical device"
M software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/i2c-algo-xilinx.c
commit cc735d88c8c256d7c38003af0f343b56a6de00ad
Author: Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx>
Date: Tue Mar 4 13:54:42 2008 +0100
The Xilinx IIC functionality missed the indicator flag I2C_FUNC_I2C
Now the realtime clock DS1337 on the HS3-AC module can be read
M software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/i2c-algo-xilinx.c
commit df12b7689c512c922bc7a11d1d402b0a6a58214f
Author: Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx>
Date: Mon Mar 3 17:12:38 2008 +0100
[hs3-ac-iba] Xilinx IIC adapter integrated
When Linux boots we can see some output about i2c components. The
files /proc/iomem and /proc/interrupts show something about "xilinx_iic.0".
If it really works is not proved yet!
M software/linux-2.6.x-petalogix/drivers/i2c/algos/Kconfig
M software/linux-2.6.x-petalogix/drivers/i2c/algos/Makefile
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/Makefile
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/i2c-algo-xilinx.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic.h
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_i.h
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_intr.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_l.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_l.h
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_master.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/xilinx_iic/xiic_options.c
commit 1f7d2c9fe150ff60cdcd8f68623e4653a3785a6f
Author: Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx>
Date: Thu Oct 25 13:14:36 2007 +0200
Initial commit
A software/linux-2.6.x-petalogix/drivers/i2c/algos/Kconfig
A software/linux-2.6.x-petalogix/drivers/i2c/algos/Makefile
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-bit.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-pca.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-pca.h
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-pcf.c
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-pcf.h
A software/linux-2.6.x-petalogix/drivers/i2c/algos/i2c-algo-sgi.c
John Williams <jwilliams@xxxxxxxxxxxxxx> wrote:
> Hi Bret,
> Bret Ketchum wrote:
>
> >
> > Does Petalinux support instances of opb_iic (like microblaze-uClinux)?
>
> Currently no. I notice there is a xilinx_iic driver in git.xilinx.org
> that could be imported pretty easily
>
> drivers/i2c/algos/xilinx_iic
>
> Cheers,
>
> John
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
--
Dr. Johann Pfefferl ------------ mailto j.pfefferl at eubus dot net
Eubus GmbH http://www.eubus.net ++++ http://www.ebmhydraxc.com
Gollierstr. 70
D-80339 Muenchen
Phone: +49 (0)89 45 22 578-67 Fax: +49 (0)89 45 22 578-55
Registergericht Muenchen HRB 145 336, Ust-Id Nr. DE 225 783 933
Geschaeftsfuehrer: Volker Ulrich, Peter Sibities
==
-o) A computer program does what you tell it to do,
/\\ not what you want it to do.
_\_v-
Attachment:
iic-1.patch.gz
Description: Binary data
Attachment:
iic-2.patch.gz
Description: Binary data