* Down when i get date from rtc by "hwclock --hctosys"
From: liChunlin @ 2007-05-17 7:28 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
The system is Embeded Linux with kernel 2.6.14. And the CPU is MPC8270 of freescale. The rtc module is "Generic /dev/rtc emulation" and "Extended RTC operation". And the chip of rtc is ds1338 with the interface of i2c. The module of i2c has been included.
When i enable the dcache of mpc8270 and use "hwclock --hctosys" or "hwclock --show", the system will down. But if i disable dcache, it is ok. I found that when it call schedule_work(&genrtc_task) in the function "static inline int gen_set_rtc_irq_bit(unsigned char bit)" in file genrtc.c it will down.
Can you help me?
Thanks.Leo
_________________________________________________________________
中国十大热门旅游景点
http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE
[-- Attachment #2: Type: text/html, Size: 939 bytes --]
^ permalink raw reply
* Down when i get date from rtc by "hwclock --hctosys"
From: li.chunlin @ 2007-05-17 7:25 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
The system is Embeded Linux with kernel 2.6.14. And the CPU is MPC8270 of
freescale. The rtc module is "Generic /dev/rtc emulation" and "Extended
RTC operation". And the chip of rtc is ds1338 with the interface of i2c.
The module of i2c has been included.
When i enable the dcache of mpc8270 and use "hwclock --hctosys" or
"hwclock --show", the system will down. But if i disable dcache, it is ok.
I found that when it call schedule_work(&genrtc_task) in the function
"static inline int gen_set_rtc_irq_bit(unsigned char bit)" in file
genrtc.c it will down.
Can you help me?
Thanks.
Leo
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
[-- Attachment #2: Type: text/html, Size: 2208 bytes --]
^ permalink raw reply
* Re: Slab allocators: Define common size limitations
From: Geert Uytterhoeven @ 2007-05-17 8:45 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linuxppc-dev, Andrew Morton, Christoph Lameter,
Linux Kernel Development, linux-mm
In-Reply-To: <200705162342.08601.arnd@arndb.de>
On Wed, 16 May 2007, Arnd Bergmann wrote:
> On Wednesday 16 May 2007, Geert Uytterhoeven wrote:
> > What are the changes a large allocation will actually succeed?
> > Is there an alignment rule for large allocations?
> >
> > E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned
> > block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe
> > kmalloc() becomes a suitable alternative now?
>
> kmalloc is limited to 128KiB on most architectures. Normally there is no
> need to use it anyway, just use __get_free_pages(). It will generally
> succeed at early boot time, but not after the system has been running
> for some time.
Exactly my understanding. And __get_free_pages() returns PAGE_SIZE-aligned
memory. So I'll keep the current code.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply
* [PATCH] don't link timer.o for powerpc systems using generic rtc
From: Guennadi Liakhovetski @ 2007-05-17 8:56 UTC (permalink / raw)
To: linuxppc-dev
With both generic rtc and powerpc timer suspend / resume code now in the
(powerpc.git) tree, powerpc platforms using the generic timer and enabling
power management will have timer.o linked in the kernel, which they don't
need. Moreover, it will likely WARN_ON(!ppc_md.get_rtc_time), save
zero-time and return no error on suspend...
As a possible solution we can choose not to build timer.o when RTC_CLASS
is enabled. However, I can imagine systems with 2 rtc's, one served by the
ppc-rtc, another one generic built as a module, in which case using the
ppc-rtc for suspend / resume will be impossible. Not to say, that such a
configuration would be ugly...
Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index c3ce0bd..31da3b3 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -20,7 +20,9 @@ mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o
# contains only the suspend handler for time
+ifeq ($(CONFIG_RTC_CLASS),)
obj-$(CONFIG_PM) += timer.o
+endif
ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_I8259) += i8259.o
^ permalink raw reply related
* Re: Please pull from 'for_paulus' branch
From: Paul Mackerras @ 2007-05-17 10:49 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0705151715200.17092@localhost.localdomain>
Kumar Gala writes:
> diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/htashtable.S
> index e756942..fc30b6f 100644
> --- a/arch/ppc/mm/hashtable.S
> +++ b/arch/ppc/mm/hashtable.S
> @@ -461,9 +465,15 @@ found_slot:
> sync /* make sure pte updates get to memory */
> blr
>
> - .comm next_slot,4
> - .comm primary_pteg_full,4
> - .comm htab_hash_searches,4
> + .section .bss
> + .align 2
> +next_slot:
> + .space 4
> +primary_pteg_full:
> + .space 4
> +htab_hash_searches:
> + .space 4
> + .previous
I get this on an ARCH=ppc prep build:
arch/ppc/kernel/built-in.o: In function `__main':
arch/ppc/kernel/entry.S:(.text+0x2eda): undefined reference to `htab_hash_searches'
arch/ppc/kernel/entry.S:(.text+0x2ede): undefined reference to `htab_hash_searches'
arch/ppc/kernel/entry.S:(.text+0x2ee2): undefined reference to `primary_pteg_full'
arch/ppc/kernel/entry.S:(.text+0x2ee6): undefined reference to
`primary_pteg_full'
(The references are actually in arch/ppc/kernel/ppc_htab.c.)
I guess I'll cherry-pick the other commits from your tree, since I'm
making a string for Linus, unless you have a better suggestion.
Paul.
^ permalink raw reply
* Re: PPC64 build breakage drivers/pci/hotplug/rpadlpar_sysfs.c
From: Mel Gorman @ 2007-05-17 10:40 UTC (permalink / raw)
To: Bob Picco; +Cc: linuxppc-dev, Andrew Morton, linux-kernel
In-Reply-To: <20070516133046.GB25792@localhost>
On (16/05/07 09:30), Bob Picco didst pronounce:
> bob.picco@hp.com
> Bcc:
> Subject: Re: 2.6.22-rc1-mm1 powerpc build breakage
> Reply-To:
> In-Reply-To: <20070515201914.16944e04.akpm@linux-foundation.org>
>
> /usr/src/linux-2.6.22-rc1-mm1/drivers/pci/hotplug/rpadlpar_sysfs.c:132: error: unknown field `subsys' specified in initializer
> /usr/src/linux-2.6.22-rc1-mm1/drivers/pci/hotplug/rpadlpar_sysfs.c:132: warning: initialization from incompatible pointer type
> make[4]: *** [drivers/pci/hotplug/rpadlpar_sysfs.o] Error 1
> make[3]: *** [drivers/pci/hotplug] Error 2
> make[2]: *** [drivers/pci] Error 2
> make[1]: *** [drivers] Error 2
> make: *** [_all] Error 2
>
This is showing up on TKO as well and Andy Whitcroft has kicked it
around a bit as far as I know. He makes it build with this patch
http://test.kernel.org/abat/88951/build/patches/update-sysfs-kset-initialisation-in-PPC64-DLPAR-IO-driver
However, my understand is that the driver is broken even though it builds
but I don't recall why. I've added Andy to the CC
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply
* Re: [PATCH] powerpc: Fix VDSO compile warning
From: Segher Boessenkool @ 2007-05-17 11:47 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <20070517112704.c4ec9330.sfr@canb.auug.org.au>
>> Maybe the type should have been char[] instead of __u8[]
>> in the first place, but this will do.
>
> What warning do you get?
Oh sorry, should have mentioned that:
arch/powerpc/kernel/vdso.c: In function 'vdso_init':
arch/powerpc/kernel/vdso.c:673: warning: passing argument
1 of 'strcpy' from incompatible pointer type
> What compiler version?
GCC mainline of two days ago.
Segher
^ permalink raw reply
* Re: Please pull from 'for_paulus' branch
From: Segher Boessenkool @ 2007-05-17 12:05 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17996.13115.456275.413478@cargo.ozlabs.ibm.com>
>> - .comm next_slot,4
>> - .comm primary_pteg_full,4
>> - .comm htab_hash_searches,4
>> + .section .bss
>> + .align 2
>> +next_slot:
>> + .space 4
>> +primary_pteg_full:
>> + .space 4
>> +htab_hash_searches:
>> + .space 4
>> + .previous
Looks like it is missing some .globl?
Segher
^ permalink raw reply
* Re: Please pull from 'for_paulus' branch
From: Kumar Gala @ 2007-05-17 12:58 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <76ac246f0188437c6ad8922466947f88@kernel.crashing.org>
On May 17, 2007, at 7:05 AM, Segher Boessenkool wrote:
>>> - .comm next_slot,4
>>> - .comm primary_pteg_full,4
>>> - .comm htab_hash_searches,4
>>> + .section .bss
>>> + .align 2
>>> +next_slot:
>>> + .space 4
>>> +primary_pteg_full:
>>> + .space 4
>>> +htab_hash_searches:
>>> + .space 4
>>> + .previous
>
> Looks like it is missing some .globl?
Yep, on ARCH=powerpc we don't have the ppc_htab.c code so this didn't
show up. Odd, I swore I built an ARCH=ppc kernel. Its now fixed in
my tree.
- k
^ permalink raw reply
* Re: Please pull from 'for_paulus' branch
From: Kumar Gala @ 2007-05-17 13:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17996.13115.456275.413478@cargo.ozlabs.ibm.com>
On May 17, 2007, at 5:49 AM, Paul Mackerras wrote:
> Kumar Gala writes:
>
>> diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/htashtable.S
>> index e756942..fc30b6f 100644
>> --- a/arch/ppc/mm/hashtable.S
>> +++ b/arch/ppc/mm/hashtable.S
>
>> @@ -461,9 +465,15 @@ found_slot:
>> sync /* make sure pte updates get to memory */
>> blr
>>
>> - .comm next_slot,4
>> - .comm primary_pteg_full,4
>> - .comm htab_hash_searches,4
>> + .section .bss
>> + .align 2
>> +next_slot:
>> + .space 4
>> +primary_pteg_full:
>> + .space 4
>> +htab_hash_searches:
>> + .space 4
>> + .previous
>
> I get this on an ARCH=ppc prep build:
>
> arch/ppc/kernel/built-in.o: In function `__main':
> arch/ppc/kernel/entry.S:(.text+0x2eda): undefined reference to
> `htab_hash_searches'
> arch/ppc/kernel/entry.S:(.text+0x2ede): undefined reference to
> `htab_hash_searches'
> arch/ppc/kernel/entry.S:(.text+0x2ee2): undefined reference to
> `primary_pteg_full'
> arch/ppc/kernel/entry.S:(.text+0x2ee6): undefined reference to
> `primary_pteg_full'
>
> (The references are actually in arch/ppc/kernel/ppc_htab.c.)
>
> I guess I'll cherry-pick the other commits from your tree, since I'm
> making a string for Linus, unless you have a better suggestion.
Sorry for the headache, I thought I had built an ARCH=ppc kernel.
This is now fixed in my tree so if you haven't pulled it you'll get
the fix.
Also, added a ppc_ksysm.c fix to remove a duplicate export symbol.
- k
^ permalink raw reply
* [PPC] Remove duplicate export of __div64_32.
From: Kumar Gala @ 2007-05-17 12:57 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
We now get the export of __div64_32 from lib/div64.c and can drop the one
in ppc_ksysm.c
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
This is in the for_paulus branch of my powerpc.git, just posting for
completeness.
- k
commit f5e6eb4606a69c8e661cb6f976e206f859bc1b0f
tree b8ae348e1c4fa721fc81d55420b23f5a7fb6a5cf
parent a440da68f5e93544ef5c924792b2a5b556c4a535
author Kumar Gala <galak@kernel.crashing.org> Thu, 17 May 2007 07:52:42 -0500
committer Kumar Gala <galak@kernel.crashing.org> Thu, 17 May 2007 07:52:42 -0500
arch/ppc/kernel/ppc_ksyms.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 4ad4996..e76f076 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -93,7 +93,6 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strcmp);
-EXPORT_SYMBOL(__div64_32);
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic);
^ permalink raw reply related
* [PATCH 2.6.21-rt2] PowerPC: revert fix for threaded fasteoi IRQ handlers
From: Sergei Shtylyov @ 2007-05-17 13:20 UTC (permalink / raw)
To: mingo, tglx; +Cc: linuxppc-dev, linux-kernel, dwalker
In-Reply-To: <200611192243.34850.sshtylyov@ru.mvista.com>
Revert the change to the "fasteoi" type chips as after handle_fasteoi_irq() had
been fixed, they've become meaningless (and even dangerous -- as was the case
with Celleb that has been fixed earlier)...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
The patch in question wasn't even initially accepted but then was erroneously
restored along with the TOD patch. I've asked to revert it but to no avail,
so here's the formal patch to revert it at last...
arch/powerpc/platforms/iseries/irq.c | 1 -
arch/powerpc/platforms/pseries/xics.c | 2 --
arch/powerpc/sysdev/mpic.c | 1 -
3 files changed, 4 deletions(-)
Index: linux-2.6/arch/powerpc/platforms/iseries/irq.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/irq.c
+++ linux-2.6/arch/powerpc/platforms/iseries/irq.c
@@ -279,7 +279,6 @@ static struct irq_chip iseries_pic = {
.shutdown = iseries_shutdown_IRQ,
.unmask = iseries_enable_IRQ,
.mask = iseries_disable_IRQ,
- .ack = iseries_end_IRQ,
.eoi = iseries_end_IRQ
};
Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c
+++ linux-2.6/arch/powerpc/platforms/pseries/xics.c
@@ -456,7 +456,6 @@ static struct irq_chip xics_pic_direct =
.startup = xics_startup,
.mask = xics_mask_irq,
.unmask = xics_unmask_irq,
- .ack = xics_eoi_direct,
.eoi = xics_eoi_direct,
.set_affinity = xics_set_affinity
};
@@ -467,7 +466,6 @@ static struct irq_chip xics_pic_lpar = {
.startup = xics_startup,
.mask = xics_mask_irq,
.unmask = xics_unmask_irq,
- .ack = xics_eoi_lpar,
.eoi = xics_eoi_lpar,
.set_affinity = xics_set_affinity
};
Index: linux-2.6/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mpic.c
+++ linux-2.6/arch/powerpc/sysdev/mpic.c
@@ -776,7 +776,6 @@ static int mpic_set_irq_type(unsigned in
static struct irq_chip mpic_irq_chip = {
.mask = mpic_mask_irq,
.unmask = mpic_unmask_irq,
- .ack = mpic_end_irq,
.eoi = mpic_end_irq,
.set_type = mpic_set_irq_type,
};
^ permalink raw reply
* [PATCH] fix 440-related Kconfig warnings
From: Christoph Hellwig @ 2007-05-17 13:24 UTC (permalink / raw)
To: linuxppc-dev
Currently there is no IBM_NEW_EMAC_ZMII in the tree, so we shouldn't
selected it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/arch/powerpc/platforms/44x/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig 2007-05-17 14:06:45.000000000 +0200
+++ linux-2.6/arch/powerpc/platforms/44x/Kconfig 2007-05-17 14:06:56.000000000 +0200
@@ -38,7 +38,7 @@ config 440EP
config 440GP
bool
- select IBM_NEW_EMAC_ZMII
+# select IBM_NEW_EMAC_ZMII
config 440GX
bool
Index: linux-2.6/arch/powerpc/platforms/4xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/4xx/Kconfig 2007-05-17 14:16:46.000000000 +0200
+++ linux-2.6/arch/powerpc/platforms/4xx/Kconfig 2007-05-17 14:16:52.000000000 +0200
@@ -171,7 +171,7 @@ config 440EP
config 440GP
bool
- select IBM_NEW_EMAC_ZMII
+# select IBM_NEW_EMAC_ZMII
config 440GX
bool
^ permalink raw reply
* Re: PPC64 build breakage drivers/pci/hotplug/rpadlpar_sysfs.c
From: Brian King @ 2007-05-17 13:37 UTC (permalink / raw)
To: Mel Gorman; +Cc: linuxppc-dev, Andrew Morton, linux-kernel, Bob Picco
In-Reply-To: <20070517104008.GA667@skynet.ie>
Mel Gorman wrote:
> On (16/05/07 09:30), Bob Picco didst pronounce:
>> bob.picco@hp.com
>> /usr/src/linux-2.6.22-rc1-mm1/drivers/pci/hotplug/rpadlpar_sysfs.c:132: error: unknown field `subsys' specified in initializer
>> /usr/src/linux-2.6.22-rc1-mm1/drivers/pci/hotplug/rpadlpar_sysfs.c:132: warning: initialization from incompatible pointer type
>> make[4]: *** [drivers/pci/hotplug/rpadlpar_sysfs.o] Error 1
>> make[3]: *** [drivers/pci/hotplug] Error 2
>> make[2]: *** [drivers/pci] Error 2
>> make[1]: *** [drivers] Error 2
>> make: *** [_all] Error 2
>>
>
> This is showing up on TKO as well and Andy Whitcroft has kicked it
> around a bit as far as I know. He makes it build with this patch
> http://test.kernel.org/abat/88951/build/patches/update-sysfs-kset-initialisation-in-PPC64-DLPAR-IO-driver
>
> However, my understand is that the driver is broken even though it builds
> but I don't recall why. I've added Andy to the CC
Al Viro posted a patch yesterday that fixes this:
http://ozlabs.org/pipermail/linuxppc-dev/2007-May/036222.html
It's in mainline now.
-Brian
^ permalink raw reply
* [PATCH 2/5] i2c: Allow preallocation of I2C bus numbers.
From: Scott Wood @ 2007-05-17 14:38 UTC (permalink / raw)
To: i2c; +Cc: linuxppc-dev
The new-style i2c device model requires the bus number to be known before
adapter registration; this provides a mechanism by which such numbers can
be allocated globally before calling i2c_register_board_info().
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
drivers/i2c/i2c-core.c | 67 ++++++++++++++++++++++++++++++++++++++---------
include/linux/i2c.h | 2 +
2 files changed, 56 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 64f8e56..37e9002 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -377,20 +377,15 @@ out_list:
}
/**
- * i2c_add_adapter - declare i2c adapter, use dynamic bus number
- * @adapter: the adapter to add
- *
- * This routine is used to declare an I2C adapter when its bus number
- * doesn't matter. Examples: for I2C adapters dynamically added by
- * USB links or PCI plugin cards.
+ * i2c_alloc_bus_number - Request a number for an i2c adapter
*
- * When this returns zero, a new bus number was allocated and stored
- * in adap->nr, and the specified adapter became available for clients.
- * Otherwise, a negative errno value is returned.
+ * Allocates an i2c bus number to be used later with
+ * i2c_add_prenumbered_adapter(), allowing i2c_register_board_info()
+ * to be called in the meantime.
*/
-int i2c_add_adapter(struct i2c_adapter *adapter)
+int i2c_alloc_bus_number(void)
{
- int id, res = 0;
+ int id, res;
retry:
if (idr_pre_get(&i2c_adapter_idr, GFP_KERNEL) == 0)
@@ -398,8 +393,8 @@ retry:
mutex_lock(&core_lists);
/* "above" here means "above or equal to", sigh */
- res = idr_get_new_above(&i2c_adapter_idr, adapter,
- __i2c_first_dynamic_bus_num, &id);
+ res = idr_get_new_above(&i2c_adapter_idr, NULL,
+ __i2c_first_dynamic_bus_num, &id);
mutex_unlock(&core_lists);
if (res < 0) {
@@ -408,9 +403,55 @@ retry:
return res;
}
+ return id;
+}
+EXPORT_SYMBOL(i2c_alloc_bus_number);
+
+/**
+ * i2c_add_prenumbered_adapter - declare i2c adapter using preallocated number
+ * @adapter: the adapter to add
+ * @id: the result of a previous call to i2c_alloc_bus_number()
+ *
+ * This routine is used to declare an I2C adapter when its bus number
+ * doesn't matter. Examples: for I2C adapters dynamically added by
+ * USB links or PCI plugin cards.
+ *
+ * When this returns zero, a new bus number was allocated and stored
+ * in adap->nr, and the specified adapter became available for clients.
+ * Otherwise, a negative errno value is returned.
+ */
+int i2c_add_prenumbered_adapter(struct i2c_adapter *adapter, int id)
+{
adapter->nr = id;
+
+ mutex_lock(&core_lists);
+ idr_replace(&i2c_adapter_idr, adapter, id);
+ mutex_unlock(&core_lists);
+
return i2c_register_adapter(adapter);
}
+EXPORT_SYMBOL(i2c_add_prenumbered_adapter);
+
+/**
+ * i2c_add_adapter - declare i2c adapter, use dynamic bus number
+ * @adapter: the adapter to add
+ *
+ * This routine is used to declare an I2C adapter when its bus number
+ * doesn't matter. Examples: for I2C adapters dynamically added by
+ * USB links or PCI plugin cards.
+ *
+ * When this returns zero, a new bus number was allocated and stored
+ * in adap->nr, and the specified adapter became available for clients.
+ * Otherwise, a negative errno value is returned.
+ */
+int i2c_add_adapter(struct i2c_adapter *adapter)
+{
+ int id = i2c_alloc_bus_number();
+ if (id < 0)
+ return id;
+
+ return i2c_add_prenumbered_adapter(adapter, id);
+}
EXPORT_SYMBOL(i2c_add_adapter);
/**
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index cae7d61..da2b4f5 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -369,8 +369,10 @@ struct i2c_client_address_data {
/* administration...
*/
+extern int i2c_alloc_bus_number(void);
extern int i2c_add_adapter(struct i2c_adapter *);
extern int i2c_del_adapter(struct i2c_adapter *);
+extern int i2c_add_prenumbered_adapter(struct i2c_adapter *, int id);
extern int i2c_add_numbered_adapter(struct i2c_adapter *);
extern int i2c_register_driver(struct module *, struct i2c_driver *);
--
1.5.0.3
^ permalink raw reply related
* [PATCH 3/5] powerpc: Document device nodes for I2C devices.
From: Scott Wood @ 2007-05-17 14:38 UTC (permalink / raw)
To: linuxppc-dev; +Cc: i2c
Document the use of device trees to describe devices on an I2C bus, which
will be used with David Brownell's "new style" I2C binding patches.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
Documentation/powerpc/booting-without-of.txt | 34 ++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index b49ce16..67026ad 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1257,6 +1257,8 @@ platforms are moved over to use the flattened-device-tree model.
e) I2C
+ e1) I2C Controller
+
Required properties :
- device_type : Should be "i2c"
@@ -1277,6 +1279,10 @@ platforms are moved over to use the flattened-device-tree model.
a digital filter sampling rate register
- fsl5200-clocking : boolean; if defined, indicated that this device
uses the FSL 5200 clocking mechanism.
+ - #address-cells : should exist and be 1 if I2C devices are declared
+ in the device tree.
+ - #size-cells : should exist and be 0 if I2C devices are declared
+ in the device tree.
Example :
@@ -1289,6 +1295,34 @@ platforms are moved over to use the flattened-device-tree model.
dfsrr;
};
+ e2) I2C Devices
+
+ Required properties :
+
+ - reg : Unshifted 7-bit I2C address for the device
+
+ Recommended properties :
+
+ - compatible : The name of the Linux device driver that
+ handles this device. If unspecified, the name of the
+ node will be used.
+ - interrupts : <a b> where a is the interrupt number and b is a
+ field that represents an encoding of the sense and level
+ information for the interrupt. This should be encoded based on
+ the information in section 2) depending on the type of interrupt
+ controller you have.
+ - interrupt-parent : the phandle for the interrupt controller that
+ services interrupts for this device.
+
+ Example :
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "ds1374";
+ reg = <68>;
+ interrupts = <13 8>;
+ interrupt-parent = <700>;
+ };
f) Freescale SOC USB controllers
--
1.5.0.3
^ permalink raw reply related
* [PATCH 4/5] powerpc: Add of_register_i2c_devices().
From: Scott Wood @ 2007-05-17 14:38 UTC (permalink / raw)
To: linuxppc-dev; +Cc: i2c
Add of_register_i2c_devices(), which scans the children of the specified
I2C adapter node, and registers them with the I2C code.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/kernel/prom_parse.c | 42 ++++++++++++++++++++++++++++++++++++++
drivers/i2c/busses/i2c-mpc.c | 2 +-
include/asm-powerpc/prom.h | 1 +
3 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 3786dcc..5e80062 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -1067,3 +1067,45 @@ void __iomem *of_iomap(struct device_node *np, int index)
return ioremap(res.start, 1 + res.end - res.start);
}
EXPORT_SYMBOL(of_iomap);
+
+#ifdef CONFIG_I2C
+#include <linux/i2c.h>
+
+void of_register_i2c_devices(struct device_node *adap_node, int bus_num)
+{
+ struct device_node *node = NULL;
+
+ while ((node = of_get_next_child(adap_node, node))) {
+ struct i2c_board_info info;
+ const u32 *addr;
+ const char *name;
+ int len;
+
+ addr = get_property(node, "reg", &len);
+ if (!addr || len < sizeof(int) || *addr > 0xffff)
+ continue;
+
+ info.irq = irq_of_parse_and_map(node, 0);
+ if (info.irq == NO_IRQ)
+ info.irq = -1;
+
+ name = get_property(node, "compatible", NULL);
+ if (!name)
+ name = node->name;
+ if (!name)
+ continue;
+
+ /* FIXME: the i2c code should allow drivers to specify
+ * multiple match names; board code shouldn't need to
+ * know what driver will handle a given type.
+ */
+
+ snprintf(info.driver_name, KOBJ_NAME_LEN, name);
+ snprintf(info.type, KOBJ_NAME_LEN, name);
+ info.platform_data = NULL;
+ info.addr = *addr;
+
+ i2c_register_board_info(bus_num, &info, 1);
+ }
+}
+#endif /* CONFIG_I2C */
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index c6b6898..b7870de 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -329,7 +329,7 @@ static int fsl_i2c_probe(struct platform_device *pdev)
i2c->adap = mpc_ops;
i2c_set_adapdata(&i2c->adap, i2c);
i2c->adap.dev.parent = &pdev->dev;
- if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
+ if ((result = i2c_add_prenumbered_adapter(&i2c->adap, pdev->id)) < 0) {
printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
goto fail_add;
}
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 6845af9..ed085e1 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -305,6 +305,7 @@ extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec,
u32 ointsize, const u32 *addr,
struct of_irq *out_irq);
+void of_register_i2c_devices(struct device_node *adap_node, int bus_num);
/**
* of_irq_map_one - Resolve an interrupt for a device
--
1.5.0.3
^ permalink raw reply related
* [PATCH 5/5] powerpc: Call of_register_i2c_devices() for fsl-i2c.
From: Scott Wood @ 2007-05-17 14:39 UTC (permalink / raw)
To: linuxppc-dev; +Cc: i2c
Call of_register_i2c_devices() to register I2C devices on
the device tree under an fsl-i2c node.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/sysdev/fsl_soc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index cad1757..0ab9603 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -340,6 +340,8 @@ static int __init fsl_i2c_of_init(void)
fsl_i2c_platform_data));
if (ret)
goto unreg;
+
+ of_register_i2c_devices(np, i);
}
return 0;
--
1.5.0.3
^ permalink raw reply related
* [PATCH v2] powerpc: Add of_register_i2c_devices().
From: Scott Wood @ 2007-05-17 14:59 UTC (permalink / raw)
To: linuxppc-dev; +Cc: i2c
Add of_register_i2c_devices(), which scans the children of the specified
I2C adapter node, and registers them with the I2C code.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
Now without the i2c-mpc bit. Sorry about that.
arch/powerpc/kernel/prom_parse.c | 42 ++++++++++++++++++++++++++++++++++++++
include/asm-powerpc/prom.h | 1 +
2 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 3786dcc..5e80062 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -1067,3 +1067,45 @@ void __iomem *of_iomap(struct device_node *np, int index)
return ioremap(res.start, 1 + res.end - res.start);
}
EXPORT_SYMBOL(of_iomap);
+
+#ifdef CONFIG_I2C
+#include <linux/i2c.h>
+
+void of_register_i2c_devices(struct device_node *adap_node, int bus_num)
+{
+ struct device_node *node = NULL;
+
+ while ((node = of_get_next_child(adap_node, node))) {
+ struct i2c_board_info info;
+ const u32 *addr;
+ const char *name;
+ int len;
+
+ addr = get_property(node, "reg", &len);
+ if (!addr || len < sizeof(int) || *addr > 0xffff)
+ continue;
+
+ info.irq = irq_of_parse_and_map(node, 0);
+ if (info.irq == NO_IRQ)
+ info.irq = -1;
+
+ name = get_property(node, "compatible", NULL);
+ if (!name)
+ name = node->name;
+ if (!name)
+ continue;
+
+ /* FIXME: the i2c code should allow drivers to specify
+ * multiple match names; board code shouldn't need to
+ * know what driver will handle a given type.
+ */
+
+ snprintf(info.driver_name, KOBJ_NAME_LEN, name);
+ snprintf(info.type, KOBJ_NAME_LEN, name);
+ info.platform_data = NULL;
+ info.addr = *addr;
+
+ i2c_register_board_info(bus_num, &info, 1);
+ }
+}
+#endif /* CONFIG_I2C */
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 6845af9..ed085e1 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -305,6 +305,7 @@ extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec,
u32 ointsize, const u32 *addr,
struct of_irq *out_irq);
+void of_register_i2c_devices(struct device_node *adap_node, int bus_num);
/**
* of_irq_map_one - Resolve an interrupt for a device
--
1.5.0.3
^ permalink raw reply related
* [PATCH] i2c: Convert i2c-mpc.c to use i2c_add_prenumbered_adapter().
From: Scott Wood @ 2007-05-17 14:59 UTC (permalink / raw)
To: i2c; +Cc: linuxppc-dev
This allows platform code to preregister devices on the i2c bus.
---
drivers/i2c/busses/i2c-mpc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index c6b6898..b7870de 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -329,7 +329,7 @@ static int fsl_i2c_probe(struct platform_device *pdev)
i2c->adap = mpc_ops;
i2c_set_adapdata(&i2c->adap, i2c);
i2c->adap.dev.parent = &pdev->dev;
- if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
+ if ((result = i2c_add_prenumbered_adapter(&i2c->adap, pdev->id)) < 0) {
printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
goto fail_add;
}
--
1.5.0.3
^ permalink raw reply related
* Re: [i2c] [PATCH 5/5] powerpc: Call of_register_i2c_devices() for fsl-i2c.
From: Scott Wood @ 2007-05-17 15:03 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, i2c
In-Reply-To: <20070517143911.GE29795@ld0162-tx32.am.freescale.net>
Scott Wood wrote:
> Call of_register_i2c_devices() to register I2C devices on
> the device tree under an fsl-i2c node.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_soc.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> index cad1757..0ab9603 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -340,6 +340,8 @@ static int __init fsl_i2c_of_init(void)
> fsl_i2c_platform_data));
> if (ret)
> goto unreg;
> +
> + of_register_i2c_devices(np, i);
> }
>
> return 0;
Gah, that isn't the right patch -- I need to stop posting patches before
noon. :-P
I have one somewhere that calls i2c_alloc_bus_number(), I'll post it
when I find it.
-Scott
^ permalink raw reply
* [PATCH] powerpc: fsl_soc: Pre-allocate i2c bus number and pre-register devices.
From: Scott Wood @ 2007-05-17 15:19 UTC (permalink / raw)
To: linuxppc-dev; +Cc: i2c
A bus number is dynamically allocated, used to register devices
with i2c_register_board_info(), and then passed to the i2c-mpc
driver to use with i2c_add_prenumbered_adapter().
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
This supersedes the "Call of_register_i2c_devices() for fsl-i2c" patch.
arch/powerpc/sysdev/fsl_soc.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index cad1757..4ff0daf 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -26,6 +26,7 @@
#include <linux/fsl_devices.h>
#include <linux/fs_enet_pd.h>
#include <linux/fs_uart_pd.h>
+#include <linux/i2c.h>
#include <asm/system.h>
#include <asm/atomic.h>
@@ -319,7 +320,13 @@ static int __init fsl_i2c_of_init(void)
of_irq_to_resource(np, 0, &r[1]);
- i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2);
+ ret = i2c_alloc_bus_number();
+ if (ret < 0)
+ goto err;
+
+ of_register_i2c_devices(np, ret);
+
+ i2c_dev = platform_device_register_simple("fsl-i2c", ret, r, 2);
if (IS_ERR(i2c_dev)) {
ret = PTR_ERR(i2c_dev);
goto err;
--
1.5.0.3
^ permalink raw reply related
* RE: [PATCH 5/5] PCI fixes for the MPC8641 Rev 2.0 silicon and Rev 1.02hardware
From: Wade Farnsworth @ 2007-05-17 16:03 UTC (permalink / raw)
To: Zhang Wei-r63237; +Cc: linuxppc-dev
In-Reply-To: <46B96294322F7D458F9648B60E15112C23441B@zch01exm26.fsl.freescale.net>
On Thu, 2007-05-17 at 10:50 +0800, Zhang Wei-r63237 wrote:
> Hi,
>
> If you add below sector to pci@8000, please remove the interrupt-map
> sector from pci@8000.
Correct me if I'm wrong, but I think if the interrupt-map for pci@8000
is removed then the pci devices on the revision 1.0 board will not get
the correct interrupts. I don't currently have a rev 1.0 to test
though. Can someone with a rev 1.0 HPCN board confirm this?
--Wade
> > @@ -286,6 +286,125 @@
> > f800 0 0 4 &i8259 0 0
> > >;
> >
> > + pci@00 {
> > + device_type = "pci";
> > + #interrupt-cells = <1>;
> > + #size-cells = <2>;
> > + #address-cells = <3>;
> > + reg = <0000 0 0 0 0>;
> > + bus-range = <0 fe>;
> > + ranges = <02000000 0 80000000 80000000 0
> > + 20000000
> > + 01000000 0 00000000 00000000 0
> > + 00100000>;
> > +
> > + pci@00 {
> > + device_type = "pci";
> > + #interrupt-cells = <1>;
> > + #size-cells = <2>;
> > + #address-cells = <3>;
> > + reg = <0000 0 0 0 0>;
> > + bus-range = <1 fe>;
> > + ranges = <02000000 0
> > 80000000 80000000
> > + 0 20000000
> > + 01000000 0
> > 00000000 00000000
> > + 0 00100000>;
> > + interrupt-map-mask =
> > <3f800 0 0 7>;
> > + interrupt-map = <
> > + /* IDSEL 0x11 */
> > + 28800 0 0 1 &i8259 3 2
> > + 28800 0 0 2 &i8259 4 2
> > + 28800 0 0 3 &i8259 5 2
> > + 28800 0 0 4 &i8259 6 2
> > +
> > + /* IDSEL 0x12 */
> > + 29000 0 0 1 &i8259 4 2
> > + 29000 0 0 2 &i8259 5 2
> > + 29000 0 0 3 &i8259 6 2
> > + 29000 0 0 4 &i8259 3 2
> > +
> > + /* IDSEL 0x13 */
> > + 29800 0 0 1 &i8259 0 0
> > + 29800 0 0 2 &i8259 0 0
> > + 29800 0 0 3 &i8259 0 0
> > + 29800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x14 */
> > + 2a000 0 0 1 &i8259 0 0
> > + 2a000 0 0 2 &i8259 0 0
> > + 2a000 0 0 3 &i8259 0 0
> > + 2a000 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x15 */
> > + 2a800 0 0 1 &i8259 0 0
> > + 2a800 0 0 2 &i8259 0 0
> > + 2a800 0 0 3 &i8259 0 0
> > + 2a800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x16 */
> > + 2b000 0 0 1 &i8259 0 0
> > + 2b000 0 0 2 &i8259 0 0
> > + 2b000 0 0 3 &i8259 0 0
> > + 2b000 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x17 */
> > + 2b800 0 0 1 &i8259 0 0
> > + 2b800 0 0 2 &i8259 0 0
> > + 2b800 0 0 3 &i8259 0 0
> > + 2b800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x18 */
> > + 2c000 0 0 1 &i8259 0 0
> > + 2c000 0 0 2 &i8259 0 0
> > + 2c000 0 0 3 &i8259 0 0
> > + 2c000 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x19 */
> > + 2c800 0 0 1 &i8259 0 0
> > + 2c800 0 0 2 &i8259 0 0
> > + 2c800 0 0 3 &i8259 0 0
> > + 2c800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x1a */
> > + 2d000 0 0 1 &i8259 6 2
> > + 2d000 0 0 2 &i8259 3 2
> > + 2d000 0 0 3 &i8259 4 2
> > + 2d000 0 0 4 &i8259 5 2
> > +
> > + /* IDSEL 0x1b */
> > + 2d800 0 0 1 &i8259 5 2
> > + 2d800 0 0 2 &i8259 0 0
> > + 2d800 0 0 3 &i8259 0 0
> > + 2d800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x1c */
> > + 2e000 0 0 1 &i8259 9 2
> > + 2e000 0 0 2 &i8259 a 2
> > + 2e000 0 0 3 &i8259 b 2
> > + 2e000 0 0 4 &i8259 7 2
> > +
> > + /* IDSEL 0x1d */
> > + 2e800 0 0 1 &i8259 9 2
> > + 2e800 0 0 2 &i8259 a 2
> > + 2e800 0 0 3 &i8259 b 2
> > + 2e800 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x1e */
> > + 2f000 0 0 1 &i8259 b 2
> > + 2f000 0 0 2 &i8259 0 0
> > + 2f000 0 0 3 &i8259 0 0
> > + 2f000 0 0 4 &i8259 0 0
> > +
> > + /* IDSEL 0x1f */
> > + 2f800 0 0 1 &i8259 6 2
> > + 2f800 0 0 2 &i8259 0 0
> > + 2f800 0 0 3 &i8259 0 0
> > + 2f800 0 0 4 &i8259 0 0
> > + >;
> > + };
> > + };
> > +
> > +
> > isa@f0 {
> > device_type = "isa";
> > #interrupt-cells = <2>;
> > @@ -335,7 +454,7 @@
> > #size-cells = <2>;
> > #address-cells = <3>;
> > reg = <9000 1000>;
> > - bus-range = <0 ff>;
> > + bus-range = <3 ff>;
> > ranges = <02000000 0 a0000000 a0000000
> > 0 20000000
> > 01000000 0 00000000 e3000000
> > 0 00100000>;
> > clock-frequency = <1fca055>;
>
> Best Regards,
> Zhang Wei
^ permalink raw reply
* Re: Down when i get date from rtc by "hwclock --hctosys"
From: Bhupender Saharan @ 2007-05-17 16:05 UTC (permalink / raw)
To: liChunlin; +Cc: linuxppc-embedded
In-Reply-To: <BAY124-W4059668EE4BB8933289F97AD330@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
Hi Leo,
Looks like your system is unstable when the cache is enabed. It might have
nothing to do with generic RTC driver.
Can you run cachebench or another memory benchmarks tools on the system and
see if memory sub system is OK.
Regards
Bhupi
On 5/17/07, liChunlin <lichl@hotmail.com> wrote:
>
> The system is Embeded Linux with kernel 2.6.14. And the CPU is MPC8270 of
> freescale. The rtc module is "Generic /dev/rtc emulation" and "Extended RTC
> operation". And the chip of rtc is ds1338 with the interface of i2c. The
> module of i2c has been included.
> When i enable the dcache of mpc8270 and use "hwclock --hctosys" or
> "hwclock --show", the system will down. But if i disable dcache, it is ok.
> I found that when it call schedule_work(&genrtc_task) in the function
> "static inline int gen_set_rtc_irq_bit(unsigned char bit)" in file
> genrtc.c it will down.
> Can you help me?
> Thanks.
> Leo
>
>
> ------------------------------
> 中国十大热门旅游景点 了解更多信息!<http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 1955 bytes --]
^ permalink raw reply
* Re: [PATCH 3/5] powerpc: Document device nodes for I2C devices.
From: Kumar Gala @ 2007-05-17 16:12 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, i2c
In-Reply-To: <20070517143846.GC29795@ld0162-tx32.am.freescale.net>
On May 17, 2007, at 9:38 AM, Scott Wood wrote:
> Document the use of device trees to describe devices on an I2C bus,
> which
> will be used with David Brownell's "new style" I2C binding patches.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> Documentation/powerpc/booting-without-of.txt | 34 +++++++++++++++
> +++++++++++
> 1 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/powerpc/booting-without-of.txt b/
> Documentation/powerpc/booting-without-of.txt
> index b49ce16..67026ad 100644
> --- a/Documentation/powerpc/booting-without-of.txt
> +++ b/Documentation/powerpc/booting-without-of.txt
> @@ -1257,6 +1257,8 @@ platforms are moved over to use the flattened-
> device-tree model.
>
> e) I2C
>
> + e1) I2C Controller
> +
> Required properties :
>
> - device_type : Should be "i2c"
> @@ -1277,6 +1279,10 @@ platforms are moved over to use the
> flattened-device-tree model.
> a digital filter sampling rate register
> - fsl5200-clocking : boolean; if defined, indicated that this
> device
> uses the FSL 5200 clocking mechanism.
> + - #address-cells : should exist and be 1 if I2C devices are
> declared
> + in the device tree.
> + - #size-cells : should exist and be 0 if I2C devices are declared
> + in the device tree.
As I've stated before, we need a bus number as well so we can handle
things like I2C switches and muxes.
- k
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox