LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE
From: Stephen Rothwell @ 2007-12-19 23:27 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev, spi-devel-general
In-Reply-To: <20071219203805.GC20861@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

On Wed, 19 Dec 2007 23:38:05 +0300 Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
>
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -1227,15 +1227,19 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
>  
>  	/* SPI controller is either clocked from QE or SoC clock */
>  	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
> -	if (!np)
> +	if (np) {
> +		sysclk = of_get_property(np, "brg-frequency", NULL);
> +		if (!sysclk)
> +			return -ENODEV;

You need an of_node_put(np) in the failing case.

> +	} else {
>  		np = of_find_node_by_type(NULL, "soc");
> +		if (!np)
> +			return -ENODEV;
>  
> -	if (!np)
> -		return -ENODEV;
> -
> -	sysclk = of_get_property(np, "bus-frequency", NULL);
> -	if (!sysclk)
> -		return -ENODEV;
> +		sysclk = of_get_property(np, "bus-frequency", NULL);
> +		if (!sysclk)
> +			return -ENODEV;

And again.

> +	}
>  
>  	for (np = NULL, i = 1;

There should be an of_node_put(np) before this as well.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [0/3] Add RapidIO support to powerpc architecture with memory mapping
From: Randy Vinson @ 2007-12-19 22:52 UTC (permalink / raw)
  To: Zhang Wei; +Cc: linuxppc-dev
In-Reply-To: <11975326982876-git-send-email-wei.zhang@freescale.com>

Zhang Wei wrote:
> Hi,
> 
> Those patches add RapidIO support to powerpc archiecture with
> memory mapping as below:
> 
> [1/3] Copy the arch/ppc RapidIO support to arch/powerpc
> [2/3] Make the arch/powerpc RapidIO support workable with of-device
>       and add memory mapping support.
Patch 2/3 seems to have gone missing. Was it sent?

Randy V.

> [3/3] Add the memory mapping support to rionet driver.
> 
> Best Regards,
> Zhang Wei
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 

^ permalink raw reply

* Oops: Kernel access of bad area
From: Christian Kujau @ 2007-12-19 22:14 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I started some x11 application (here: firefox) through an ssh connection 
on a remote host and it crashed somehow. OK, no biggie, killed the 
application and be done with it. However, I noticed that the load of the 
machine is now constantly at 7. It's an iBook G4, has nothing to do, 
disks, cpu, netwokr is idle and load is usually < 1. Now it's not
slow to work or anyhow sluggish, but only the load is at 7 after the 
application crashed. When I looked into dmesg I saw:

[84983.750977] Unable to handle kernel paging request for data at address 0x4815d000
[84983.751046] Faulting instruction address: 0xc0012090
[84983.751157] Oops: Kernel access of bad area, sig: 11 [#1]
[84983.751178] PREEMPT PowerMac
[84983.751214] Modules linked in: nls_iso8859_15 nls_cp850 vfat fat isofs nls_base zlib_inflate radeon drm snd_powermac snd_pcm snd_timer snd soundcore snd_page_alloc fuse firewire_ohci firewire_core crc_itu_t ide_cd cdrom ssb bcm43xx rng_core ieee80211softmac uninorth_agp ieee80211 ieee80211_crypt agpgart
[84983.751750] NIP: c0012090 LR: c00165fc CTR: 00000080
[84983.751786] REGS: cea65b30 TRAP: 0300   Not tainted  (2.6.24-rc5)
[84983.751805] MSR: 00009032 <EE,ME,IR,DR>  CR: 24822282  XER: 00000000
[84983.751946] DAR: 4815d000, DSISR: 40000000
[84983.751965] TASK = ee372670[9138] 'firefox-bin' THREAD: cea64000
[84983.751984] GPR00: e62b3a00 cea65be0 ee372670 4815d000 00000080 1bc0c181 4815d000 ffffffff
[84983.752148] GPR08: 00010008 e62b3a00 00000000 c045f000 24822288 1002ea3c cea67690 ce954000
[84983.752315] GPR16: c0420000 c03f6400 cea65cac cea65ca8 c0440000 ce974480 c07d7180 ceba2280
[84983.752468] GPR24: e62b3a00 e62b3a50 4815d000 00000574 ceba2280 4815d000 1bc0c181 c07d7180
[84983.752665] NIP [c0012090] __flush_dcache_icache+0x14/0x40
[84983.752716] LR [c00165fc] update_mmu_cache+0x11c/0x120
[...]

This is the first time that this happened on this iBook, and it was not 
reproducible so far (well, it happened just a few minutes ago). Is this 
something to worry about? Or should I file this under "well, shit 
happens"? Btw, this 2.6.24-rc5 is from Linus' -git tree (15.12.2007).

Details and .config: http://nerdbynature.de/bits/2.6.24-rc5/

Thanks,
Christian.
-- 
BOFH excuse #281:

The co-locator cannot verify the frame-relay gateway to the ISDN server.

^ permalink raw reply

* [PATCH v2] powerpc: add hugepagesz boot-time parameter
From: Jon Tollefson @ 2007-12-19 22:35 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: arnd, mel, David Gibson, linuxppc-dev, csnook

Paul, please include this in 2.6.25 if there are no objections.

This patch adds the hugepagesz boot-time parameter for ppc64.  It lets
one pick the size for huge pages. The choices available are 64K and 16M
when the base page size is 4k. It defaults to 16M (previously the only
only choice) if nothing or an invalid choice is specified.

Tested 64K huge pages successfully with the libhugetlbfs 1.2.

Changes from v1:
    disallow 64K huge pages when base page size is 64K since we can't
distinguish between
        base and huge pages when doing a hash_page()
    collapsed pmd_offset and pmd_alloc to inline calls to simplify the
main code
    removed printing of the huge page size in mm/hugetlb.c since this
information is already
       available in /proc/meminfo and leaves the remaining changes all
powerpc specific

Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 33121d6..2fc1fb8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -685,6 +685,7 @@ and is between 256 and 4096 characters. It is defined in the file
 			See Documentation/isdn/README.HiSax.
 
 	hugepages=	[HW,X86-32,IA-64] Maximal number of HugeTLB pages.
+	hugepagesz=	[HW,IA-64,PPC] The size of the HugeTLB pages.
 
 	i8042.direct	[HW] Put keyboard port into non-translated mode
 	i8042.dumbkbd	[HW] Pretend that controller can only read data from
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index cbbd8b0..9326a69 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -369,18 +369,11 @@ static void __init htab_init_page_sizes(void)
 	 * on what is available
 	 */
 	if (mmu_psize_defs[MMU_PAGE_16M].shift)
-		mmu_huge_psize = MMU_PAGE_16M;
+		set_huge_psize(MMU_PAGE_16M);
 	/* With 4k/4level pagetables, we can't (for now) cope with a
 	 * huge page size < PMD_SIZE */
 	else if (mmu_psize_defs[MMU_PAGE_1M].shift)
-		mmu_huge_psize = MMU_PAGE_1M;
-
-	/* Calculate HPAGE_SHIFT and sanity check it */
-	if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
-	    mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
-		HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
-	else
-		HPAGE_SHIFT = 0; /* No huge pages dude ! */
+		set_huge_psize(MMU_PAGE_1M);
 #endif /* CONFIG_HUGETLB_PAGE */
 }
 
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 71efb38..3099e48 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,18 +24,17 @@
 #include <asm/cputable.h>
 #include <asm/spu.h>
 
+#define HPAGE_SHIFT_64K	16
+#define HPAGE_SHIFT_16M	24
+
 #define NUM_LOW_AREAS	(0x100000000UL >> SID_SHIFT)
 #define NUM_HIGH_AREAS	(PGTABLE_RANGE >> HTLB_AREA_SHIFT)
 
-#ifdef CONFIG_PPC_64K_PAGES
-#define HUGEPTE_INDEX_SIZE	(PMD_SHIFT-HPAGE_SHIFT)
-#else
-#define HUGEPTE_INDEX_SIZE	(PUD_SHIFT-HPAGE_SHIFT)
-#endif
-#define PTRS_PER_HUGEPTE	(1 << HUGEPTE_INDEX_SIZE)
-#define HUGEPTE_TABLE_SIZE	(sizeof(pte_t) << HUGEPTE_INDEX_SIZE)
+unsigned int hugepte_shift;
+#define PTRS_PER_HUGEPTE	(1 << hugepte_shift)
+#define HUGEPTE_TABLE_SIZE	(sizeof(pte_t) << hugepte_shift)
 
-#define HUGEPD_SHIFT		(HPAGE_SHIFT + HUGEPTE_INDEX_SIZE)
+#define HUGEPD_SHIFT		(HPAGE_SHIFT + hugepte_shift)
 #define HUGEPD_SIZE		(1UL << HUGEPD_SHIFT)
 #define HUGEPD_MASK		(~(HUGEPD_SIZE-1))
 
@@ -82,11 +81,31 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
 	return 0;
 }
 
+#ifndef CONFIG_PPC_64K_PAGES
+static inline
+pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
+{
+	if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
+		return pmd_offset(pud, addr);
+	else
+		return (pmd_t *) pud;
+}
+static inline
+pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
+{
+	if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
+		return pmd_alloc(mm, pud, addr);
+	else
+		return (pmd_t *) pud;
+}
+#endif
+
 /* Modelled after find_linux_pte() */
 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pg;
 	pud_t *pu;
+	pmd_t *pm;
 
 	BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
 
@@ -96,14 +115,9 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
 	if (!pgd_none(*pg)) {
 		pu = pud_offset(pg, addr);
 		if (!pud_none(*pu)) {
-#ifdef CONFIG_PPC_64K_PAGES
-			pmd_t *pm;
-			pm = pmd_offset(pu, addr);
+			pm = hpmd_offset(pu, addr);
 			if (!pmd_none(*pm))
 				return hugepte_offset((hugepd_t *)pm, addr);
-#else
-			return hugepte_offset((hugepd_t *)pu, addr);
-#endif
 		}
 	}
 
@@ -114,6 +128,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pg;
 	pud_t *pu;
+	pmd_t *pm;
 	hugepd_t *hpdp = NULL;
 
 	BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
@@ -124,14 +139,9 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
 	pu = pud_alloc(mm, pg, addr);
 
 	if (pu) {
-#ifdef CONFIG_PPC_64K_PAGES
-		pmd_t *pm;
-		pm = pmd_alloc(mm, pu, addr);
+		pm = hpmd_alloc(mm, pu, addr);
 		if (pm)
 			hpdp = (hugepd_t *)pm;
-#else
-		hpdp = (hugepd_t *)pu;
-#endif
 	}
 
 	if (! hpdp)
@@ -158,7 +168,6 @@ static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp)
 						 PGF_CACHENUM_MASK));
 }
 
-#ifdef CONFIG_PPC_64K_PAGES
 static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
 				   unsigned long addr, unsigned long end,
 				   unsigned long floor, unsigned long ceiling)
@@ -191,7 +200,6 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
 	pud_clear(pud);
 	pmd_free_tlb(tlb, pmd);
 }
-#endif
 
 static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
 				   unsigned long addr, unsigned long end,
@@ -210,9 +218,15 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
 			continue;
 		hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
 #else
-		if (pud_none(*pud))
-			continue;
-		free_hugepte_range(tlb, (hugepd_t *)pud);
+		if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
+			if (pud_none_or_clear_bad(pud))
+				continue;
+			hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
+		} else {
+			if (pud_none(*pud))
+				continue;
+			free_hugepte_range(tlb, (hugepd_t *)pud);
+		}
 #endif
 	} while (pud++, addr = next, addr != end);
 
@@ -526,6 +540,57 @@ repeat:
 	return err;
 }
 
+void set_huge_psize(int psize)
+{
+	/* Check that it is a page size supported by the hardware and
+	 * that it fits within pagetable limits. */
+	if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT &&
+		(mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
+			mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) {
+		HPAGE_SHIFT = mmu_psize_defs[psize].shift;
+		mmu_huge_psize = psize;
+#ifdef CONFIG_PPC_64K_PAGES
+		hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
+#else
+		if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
+			hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
+		else
+			hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
+#endif
+
+	} else
+		HPAGE_SHIFT = 0;
+}
+
+static int __init hugepage_setup_sz(char *str)
+{
+	unsigned long long size;
+	int mmu_psize = -1;
+	int shift;
+
+	size = memparse(str, &str);
+
+	shift = __ffs(size);
+	switch (shift) {
+#ifndef CONFIG_PPC_64K_PAGES
+	case HPAGE_SHIFT_64K:
+		mmu_psize = MMU_PAGE_64K;
+		break;
+#endif
+	case HPAGE_SHIFT_16M:
+		mmu_psize = MMU_PAGE_16M;
+		break;
+	}
+
+	if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
+		set_huge_psize(mmu_psize);
+	else
+		printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
+
+	return 1;
+}
+__setup("hugepagesz=", hugepage_setup_sz);
+
 static void zero_ctor(struct kmem_cache *cache, void *addr)
 {
 	memset(addr, 0, kmem_cache_size(cache));
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index 12e5e77..2fda33c 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -278,6 +278,7 @@ extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
 			     unsigned long pstart, unsigned long mode,
 			     int psize, int ssize);
+extern void set_huge_psize(int psize);
 
 extern void htab_initialize(void);
 extern void htab_initialize_secondary(void);
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h
index d18ffe7..66ff7e5 100644
--- a/include/asm-powerpc/pgtable.h
+++ b/include/asm-powerpc/pgtable.h
@@ -37,6 +37,12 @@ extern void paging_init(void);
 #define io_remap_pfn_range(vma, vaddr, pfn, size, prot)		\
 		remap_pfn_range(vma, vaddr, pfn, size, prot)
 
+/* Base page size affects how we walk hugetlb page tables */
+#ifdef CONFIG_PPC_64K_PAGES
+#define hpmd_offset(pud, addr)		pmd_offset(pud, addr)
+#define hpmd_alloc(mm, pud, addr)	pmd_alloc(mm, pud, addr)
+#endif
+
 #include <asm-generic/pgtable.h>
 #endif /* __ASSEMBLY__ */
 

^ permalink raw reply related

* Re: Linux on Freescale e200
From: Per-Erik Johansson @ 2007-12-19 22:15 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <67A10FA1-8F9D-4A87-BB67-C04EC9FA5BEF@kernel.crashing.org>

>> Hi
>>
>> I'm wondering if someone has ever tried to get Linux running on a
>> Freescale e200 core?
>> I found a patch to the Linux kernel from back in 2005:
>> (http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-06/5731.html)
>> And it is listed as a processor type in Linux-2.6.23.11
>> I know that there has been some confusion about e200 and e500 cores,
>> old
>> e200 renamed to e500, but from what I understand the e200 core now
>> listed
>> in the kernel is the one currently being used in MPC55xx
>>
>> I'm having a MPC5554, e200z6 core, that I'm supposed to get Linux
>> running
>> on (master thesis) and any pointers and tips are appreciated.
>> Just finished porting/tweaking the Redboot boot loader, and I'm now
>> moving
>> on to the Linux (porting?) part.
>
> I'd suggest looking at getting u-boot running instead since that's we
> use on the majority of freescale PPCs.
>
> We did a port a while back to the e200.. so most of the basic bits
> should be there.  There might be some bit rot from its like of usage.
>
> What peripheral set are you looking to get working on the 5554?
>
> - k
>

Had a look into UBoot at first but didn't find any port for the
MPC55xx/e200, so when we stumbled upon a "working" ecos/redboot port we
went with that..
Do you know where I could find the uboot port for the e200?

We have phycore dev. kit
(http://www.phytec.com/products/rdk/PowerPC/phyCORE-MPC5554.html)
Just supposed to get it up and running, so peripherals will just be
serial, ethernet and maybe CAN.

/ Per-Erik

^ permalink raw reply

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Grant Likely @ 2007-12-19 21:38 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev, Timur Tabi
In-Reply-To: <20071219211250.GA21416@localhost.localdomain>

On 12/19/07, Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> On Wed, Dec 19, 2007 at 03:04:51PM -0600, Timur Tabi wrote:
> > Anton Vorontsov wrote:
> >
> > >diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> > >index 3cf84d0..91bac51 100644
> > >--- a/arch/powerpc/sysdev/fsl_soc.c
> > >+++ b/arch/powerpc/sysdev/fsl_soc.c
> > >@@ -1242,7 +1242,7 @@ int __init fsl_spi_init(struct spi_board_info
> > >*board_infos,
> > >     }
> > >
> > >     for (np = NULL, i = 1;
> > >-         (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
> > >+         (np = of_find_compatible_node(np, NULL, "fsl,spi")) != NULL;
> >
> > Can you keep the original code around to look for older device trees that
> > are wrong?  Backwards compatibility is important.  I don't want to have to
> > update the device tree just because I update the kernel.
>
> I though about it. Is your device tree source out of tree? Otherwise
> it should be trivial to upgrade the dtb, instead of producing cruft in
> the kernel. I vote for less legacy code, but lets see what others will
> say. So far count is 1:1. ;-)

I agree with Timur.  Please keep the test for the older names.  Some
platforms have the dtb in the same sector as u-boot, making it more
dangerous to reflash.

g.

> --
> Anton Vorontsov
> email: cbou@mail.ru
> backup email: ya-cbou@yandex.ru
> irc://irc.freenode.net/bd2
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Timur Tabi @ 2007-12-19 21:15 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071219211250.GA21416@localhost.localdomain>

Anton Vorontsov wrote:

> I though about it. Is your device tree source out of tree? Otherwise
> it should be trivial to upgrade the dtb, instead of producing cruft in
> the kernel. I vote for less legacy code, but lets see what others will
> say. So far count is 1:1. ;-)

I just want a transition period.  Whenever I write code that works with changes 
in the device tree, I always maintain compatibility with the older versions, and 
I was under the impression that this is policy.  If you update the device tree, 
you should update the kernel.  The converse, however, should not be true.

It would be really annoying if you had to swap out your device tree if you want 
to work with different kernel versions.

Maybe if the device tree compiler were part of the kernel, and every time you 
built the kernel it also built the dtb, I could accept locking the device tree 
and kernel versions.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Anton Vorontsov @ 2007-12-19 21:12 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <47698773.1010004@freescale.com>

On Wed, Dec 19, 2007 at 03:04:51PM -0600, Timur Tabi wrote:
> Anton Vorontsov wrote:
> 
> >diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> >index 3cf84d0..91bac51 100644
> >--- a/arch/powerpc/sysdev/fsl_soc.c
> >+++ b/arch/powerpc/sysdev/fsl_soc.c
> >@@ -1242,7 +1242,7 @@ int __init fsl_spi_init(struct spi_board_info 
> >*board_infos,
> > 	}
> > 
> > 	for (np = NULL, i = 1;
> >-	     (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
> >+	     (np = of_find_compatible_node(np, NULL, "fsl,spi")) != NULL;
> 
> Can you keep the original code around to look for older device trees that 
> are wrong?  Backwards compatibility is important.  I don't want to have to 
> update the device tree just because I update the kernel.

I though about it. Is your device tree source out of tree? Otherwise
it should be trivial to upgrade the dtb, instead of producing cruft in
the kernel. I vote for less legacy code, but lets see what others will
say. So far count is 1:1. ;-)

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

^ permalink raw reply

* Re: [PATCH 0/4] device_type/compatible cleanups
From: Scott Wood @ 2007-12-19 21:07 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071219204853.GA20972@localhost.localdomain>

Anton Vorontsov wrote:
> On Wed, Dec 19, 2007 at 02:34:28PM -0600, Scott Wood wrote:
>> Anton Vorontsov wrote:
>>> Scott, I didn't add "fsl,cpm-muram" stuff, it just doesn't make
>>> sense now: qe and cpm anyway using different code base.
>> That should change.
> 
> Sure. When that will change, then it will be sane to change the users,
> I think. ;-) Not the vice versa.

The device tree should describe the hardware, not the degree of 
unnecessary code forking/duplication currently present in Linux.

-Scott

^ permalink raw reply

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Timur Tabi @ 2007-12-19 21:04 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071219203817.GD20861@localhost.localdomain>

Anton Vorontsov wrote:

> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> index 3cf84d0..91bac51 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -1242,7 +1242,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
>  	}
>  
>  	for (np = NULL, i = 1;
> -	     (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
> +	     (np = of_find_compatible_node(np, NULL, "fsl,spi")) != NULL;

Can you keep the original code around to look for older device trees that are 
wrong?  Backwards compatibility is important.  I don't want to have to update 
the device tree just because I update the kernel.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Anton Vorontsov @ 2007-12-19 21:02 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <6B8F6F4B-1FD2-4A11-B4F6-A1A0ECD7342B@kernel.crashing.org>

On Wed, Dec 19, 2007 at 02:54:09PM -0600, Kumar Gala wrote:
> 
> On Dec 19, 2007, at 2:38 PM, Anton Vorontsov wrote:
> 
> >Also rename "fsl_spi" to "fsl,spi".
> >
> >Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html
> >
> >Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> >---
> >arch/powerpc/boot/dts/mpc8313erdb.dts    |    3 +--
> >arch/powerpc/boot/dts/mpc832x_mds.dts    |    6 ++----
> >arch/powerpc/boot/dts/mpc832x_rdb.dts    |    6 ++----
> >arch/powerpc/boot/dts/mpc8349emitx.dts   |    3 +--
> >arch/powerpc/boot/dts/mpc8349emitxgp.dts |    3 +--
> >arch/powerpc/boot/dts/mpc834x_mds.dts    |    3 +--
> >arch/powerpc/boot/dts/mpc836x_mds.dts    |    6 ++----
> >arch/powerpc/boot/dts/mpc8568mds.dts     |    6 ++----
> >arch/powerpc/sysdev/fsl_soc.c            |    2 +-
> >9 files changed, 13 insertions(+), 25 deletions(-)
> 
> 
> can you add cell-index as well.

Sure. Will do tomorrow since here is night already. ;-)

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

^ permalink raw reply

* Re: [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE
From: Scott Wood @ 2007-12-19 20:58 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev, spi-devel-general
In-Reply-To: <20071219203805.GC20861@localhost.localdomain>

Anton Vorontsov wrote:
> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> index 044dd7f..3cf84d0 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -1227,15 +1227,19 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
>  
>  	/* SPI controller is either clocked from QE or SoC clock */
>  	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
> -	if (!np)
> +	if (np) {
> +		sysclk = of_get_property(np, "brg-frequency", NULL);
> +		if (!sysclk)
> +			return -ENODEV;
> +	} else {

You should use get_brgfreq() instead (and fix the legacy match to find 
qe as well as soc nodes).

-Scott

^ permalink raw reply

* Re: [PATCH] [POWERPC][RFC] MPC8360E-RDK: Device tree and board file
From: Anton Vorontsov @ 2007-12-19 20:59 UTC (permalink / raw)
  To: Scott Wood; +Cc: Stephen Rothwell, linuxppc-dev
In-Reply-To: <20071217170303.GA4303@loki.buserror.net>

On Mon, Dec 17, 2007 at 11:03:04AM -0600, Scott Wood wrote:
> On Mon, Dec 17, 2007 at 04:14:03PM +1100, David Gibson wrote:
> > > +		crypto@30000 {
> > > +			device_type = "crypto";
> > > +			model = "SEC2";
> > > +			compatible = "talitos";
> > 
> > This device_type/compatible/model stuff is also crap, although I
> > suspect it needs to be fixed in the driver, as gianfar (finally) was.

Thanks everyone for the review! I did cleanups you suggested, and now
this patch depends on "[PATCH 0/4] device_type/compatible cleanups"
series.


Meanwhile added PCI and NOR flash support w/o partitions.

I still undecided on partitioning. 512KB u-boot, 128KB dtb, 2MB kernel,
4MB ramdisk, and less than 2MB for rootfs? Maybe get rid of rootfs on
the NOR flash and let kernel be 3MB? Personally, I tend to not inculcate
partition map into the dts at all.

How about that version?

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>

[POWERPC] MPC8360E-RDK: Device tree and board file

This is new board made by Freescale Semiconductor Inc. and
Logic Product Development.

Currently supported:
1. UEC1,2,7,4
2. I2C
3. SPI
4. NS16550 serial
5. PCI and miniPCI
6. Intel NOR StrataFlash X16 64Mbit PC28F640P30T85

Not supported so far:
1. StMICRO NAND512W3A2BN6E, 512 Mbit (supported with FSL UPM patches)
2. QE SCCs (slow UCCs, used as an UARTs)
3. ADC AD7843
4. FHCI USB
5. Graphics controller, Fujitsu MB86277

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc836x_rdk.dts     |  328 +++++++++++++++++++++++++++++
 arch/powerpc/platforms/83xx/Kconfig       |   11 +-
 arch/powerpc/platforms/83xx/Makefile      |    1 +
 arch/powerpc/platforms/83xx/mpc836x_rdk.c |  118 +++++++++++
 4 files changed, 457 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mpc836x_rdk.dts
 create mode 100644 arch/powerpc/platforms/83xx/mpc836x_rdk.c

diff --git a/arch/powerpc/boot/dts/mpc836x_rdk.dts b/arch/powerpc/boot/dts/mpc836x_rdk.dts
new file mode 100644
index 0000000..1d0c014
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc836x_rdk.dts
@@ -0,0 +1,328 @@
+/*
+ * MPC8360E RDK Device Tree Source
+ *
+ * Copyright 2006 Freescale Semiconductor Inc.
+ * Copyright 2007 MontaVista Software, Inc.
+ * 		  Anton Vorontsov <avorontsov@ru.mvista.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/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	compatible = "MPC8360ERDK", "MPC836xRDK", "MPC83xxRDK";
+	model = "MPC8360RDK";
+
+	aliases {
+		serial0 = &serial0;
+		serial1 = &serial1;
+		ethernet0 = &enet0;
+		ethernet1 = &enet1;
+		ethernet2 = &enet2;
+		ethernet3 = &enet3;
+		pci0 = &pci0;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,8360@0 {
+			device_type = "cpu";
+			reg = <0>;
+			d-cache-line-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <32768>;
+			i-cache-size = <32768>;
+			/* filled by u-boot */
+			timebase-frequency = <0>; 
+			bus-frequency = <0>;
+			clock-frequency = <0>;
+		};
+	};
+
+	soc8360@e0000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		device_type = "soc";
+		ranges = <0 0xe0000000 0x00100000>;
+		reg = <0xe0000000 0x00000200>;
+		/* filled by u-boot */
+		bus-frequency = <0>;
+
+		wdt@200 {
+			compatible = "mpc83xx_wdt";
+			reg = <0x200 0x100>;
+		};
+
+		i2c@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			cell-index = <0>;
+			compatible = "fsl-i2c";
+			reg = <0x3000 0x100>;
+			interrupts = <14 8>;
+			interrupt-parent = <&ipic>;
+			dfsrr;
+		};
+
+		i2c@3100 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			cell-index = <1>;
+			compatible = "fsl-i2c";
+			reg = <0x3100 0x100>;
+			interrupts = <16 8>;
+			interrupt-parent = <&ipic>;
+			dfsrr;
+		};
+
+		serial0: serial@4500 {
+			device_type = "serial";
+			compatible = "ns16550";
+			reg = <0x4500 0x100>;
+			interrupts = <9 8>;
+			interrupt-parent = <&ipic>;
+			/* filled by u-boot */
+			clock-frequency = <0>;
+		};
+
+		serial1: serial@4600 {
+			device_type = "serial";
+			compatible = "ns16550";
+			reg = <0x4600 0x100>;
+			interrupts = <10 8>;
+			interrupt-parent = <&ipic>;
+			/* filled by u-boot */
+			clock-frequency = <0>;
+		};
+
+		crypto@30000 {
+			compatible = "fsl,sec2-crypto";
+			reg = <0x30000 0x10000>;
+			interrupts = <11 8>;
+			interrupt-parent = <&ipic>;
+			num-channels = <4>;
+			channel-fifo-len = <24>;
+			exec-units-mask = <0x0000007e>;
+			/*
+			 * desc mask is for rev1.x, we need runtime fixup
+			 * for >=2.x
+			 */
+			descriptor-types-mask = <0x01010ebf>;
+		};
+
+		ipic: interrupt-controller@700 {
+			#address-cells = <0>;
+			#interrupt-cells = <2>;
+			compatible = "fsl,pq2pro-pic", "fsl,ipic";
+			interrupt-controller;
+			reg = <0x700 0x100>;
+		};
+
+		par_io@1400 {
+			compatible = "fsl,qe-pario";
+			reg = <0x1400 0x100>;
+			num-ports = <7>;
+		};
+	};
+
+	qe@e0100000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "fsl,qe";
+		ranges = <0 0xe0100000 0x00100000>;
+		reg = <0xe0100000 0x480>;
+		/* filled by u-boot */
+		brg-frequency = <0>;
+
+		muram@10000 {
+			compatible = "fsl,qe-muram";
+			ranges = <0 0x00010000 0x0000c000>;
+
+			data-only@0 {
+				compatible = "fsl,qe-muram-data";
+				reg = <0 0xc000>;
+			};
+		};
+
+		spi@4c0 {
+			compatible = "fsl,spi";
+			reg = <0x4c0 0x40>;
+			interrupts = <2>;
+			interrupt-parent = <&qeic>;
+			mode = "cpu-qe";
+		};
+
+		spi@500 {
+			compatible = "fsl,spi";
+			reg = <0x500 0x40>;
+			interrupts = <1>;
+			interrupt-parent = <&qeic>;
+			mode = "cpu-qe";
+		};
+
+		usb@6c0 {
+			compatible = "qe_udc";
+			reg = <0x6c0 0x40 0x8b00 0x100>;
+			interrupts = <11>;
+			interrupt-parent = <&qeic>;
+			mode = "slave";
+		};
+
+		enet0: ucc@2000 {
+			device_type = "network";
+			compatible = "ucc_geth";
+			model = "UCC";
+			device-id = <1>;
+			reg = <0x2000 0x200>;
+			interrupts = <32>;
+			interrupt-parent = <&qeic>;
+			rx-clock = <0>;
+			tx-clock = <25>;
+			phy-handle = <&phy2>;
+			phy-connection-type = "rgmii-id";
+			/* filled by u-boot */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+		};
+
+		enet1: ucc@3000 {
+			device_type = "network";
+			compatible = "ucc_geth";
+			model = "UCC";
+			device-id = <2>;
+			reg = <0x3000 0x200>;
+			interrupts = <33>;
+			interrupt-parent = <&qeic>;
+			rx-clock = <0>;
+			tx-clock = <20>;
+			phy-handle = <&phy4>;
+			phy-connection-type = "rgmii-id";
+			/* filled by u-boot */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+		};
+
+		enet2: ucc@2600 {
+			device_type = "network";
+			compatible = "ucc_geth";
+			model = "UCC";
+			device-id = <7>;
+			reg = <0x2600 0x200>;
+			interrupts = <34>;
+			interrupt-parent = <&qeic>;
+			rx-clock = <36>;
+			tx-clock = <35>;
+			phy-handle = <&phy1>;
+			phy-connection-type = "mii";
+			/* filled by u-boot */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+		};
+
+		enet3: ucc@3200 {
+			device_type = "network";
+			compatible = "ucc_geth";
+			model = "UCC";
+			device-id = <4>;
+			reg = <0x3200 0x200>;
+			interrupts = <35>;
+			interrupt-parent = <&qeic>;
+			rx-clock = <24>;
+			tx-clock = <23>;
+			phy-handle = <&phy3>;
+			phy-connection-type = "mii";
+			/* filled by u-boot */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+		};
+
+		mdio@2120 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x2120 0x18>;
+			compatible = "fsl,ucc-mdio";
+
+			phy1: ethernet-phy@1 {
+				compatible = "national,DP83848VV";
+				reg = <1>;
+				device_type = "ethernet-phy";
+			};
+
+			phy2: ethernet-phy@2 {
+				compatible = "broadcom,BCM5481UA2KMLG";
+				reg = <2>;
+				device_type = "ethernet-phy";
+			};
+
+			phy3: ethernet-phy@3 {
+				compatible = "national,DP83848VV";
+				reg = <3>;
+				device_type = "ethernet-phy";
+			};
+
+			phy4: ethernet-phy@4 {
+				compatible = "broadcom,BCM5481UA2KMLG";
+				reg = <4>;
+				device_type = "ethernet-phy";
+			};
+		};
+
+		qeic: interrupt-controller@80 {
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			compatible = "fsl,qe-pic";
+			interrupt-controller;
+			reg = <0x80 0x80>;
+			big-endian;
+			interrupts = <32 8 33 8>;
+			interrupt-parent = <&ipic>;
+		};
+	};
+
+	localbus@e0005000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8360-localbus",
+			     "fsl,pq2pro-localbus";
+		reg = <0xe0005000 0xd8>;
+		ranges = <0 0 0xff800000 0x800000>;
+
+		nor-flash@0,0 {
+			compatible = "intel,PC28F640P30T85", "cfi-flash";
+			reg = <0 0 0x800000>;
+			bank-width = <2>;
+			device-width = <1>;
+		};
+	};
+
+	pci0: pci@e0008500 {
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		device_type = "pci";
+		compatible = "fsl,mpc8360-pci", "fsl,mpc8349-pci";
+		reg = <0xe0008500 0x100>;
+		ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000
+			  0x42000000 0 0x80000000 0x80000000 0 0x10000000
+			  0x01000000 0 0xe0300000 0xe0300000 0 0x00100000>;
+		interrupts = <66 8>;
+		interrupt-parent = <&ipic>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = </* miniPCI0 IDSEL 0x14 AD20 */
+				 0xa000 0 0 1 &ipic 18 8
+				 0xa000 0 0 2 &ipic 19 8
+
+				 /* PCI1 IDSEL 0x15 AD21 */
+				 0xa800 0 0 1 &ipic 19 8
+				 0xa800 0 0 2 &ipic 20 8
+				 0xa800 0 0 3 &ipic 21 8
+				 0xa800 0 0 4 &ipic 18 8>;
+		/* filled by u-boot */
+		bus-range = <0 0>;
+		clock-frequency = <0>;
+	};
+};
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 2430ac8..0d5a87c 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -55,6 +55,15 @@ config MPC837x_MDS
 	select DEFAULT_UIMAGE
 	help
 	  This option enables support for the MPC837x MDS Processor Board.
+
+config MPC836x_RDK
+	bool "Freescale/Logic MPC836x RDK"
+	select DEFAULT_UIMAGE
+	select QUICC_ENGINE
+	help
+	  This option enables support for the MPC836x RDK Processor Board,
+	  also known as ZOOM PowerQUICC Kit.
+
 endchoice
 
 config PPC_MPC831x
@@ -79,7 +88,7 @@ config PPC_MPC836x
 	bool
 	select PPC_UDBG_16550
 	select PPC_INDIRECT_PCI
-	default y if MPC836x_MDS
+	default y if MPC836x_MDS || MPC836x_RDK
 
 config PPC_MPC837x
 	bool
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index df46629..bf1b799 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_MPC834x_ITX)	+= mpc834x_itx.o
 obj-$(CONFIG_MPC836x_MDS)	+= mpc836x_mds.o
 obj-$(CONFIG_MPC832x_MDS)	+= mpc832x_mds.o
 obj-$(CONFIG_MPC837x_MDS)	+= mpc837x_mds.o
+obj-$(CONFIG_MPC836x_RDK)	+= mpc836x_rdk.o
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
new file mode 100644
index 0000000..999cfa2
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
@@ -0,0 +1,118 @@
+/*
+ * MPC8360E-RDK board file.
+ *
+ * Copyright (c) 2006  Freescale Semicondutor, Inc.
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ * 		       Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/of_platform.h>
+#include <asm/prom.h>
+#include <asm/time.h>
+#include <asm/ipic.h>
+#include <asm/udbg.h>
+#include <asm/io.h>
+#include <asm/qe.h>
+#include <asm/qe_ic.h>
+#include <sysdev/fsl_soc.h>
+
+#include "mpc83xx.h"
+
+static struct of_device_id mpc836x_rdk_ids[] = {
+	{ .compatible = "soc", },
+	{ .compatible = "fsl,qe", },
+	{ .compatible = "fsl,pq2pro-localbus", },
+	{},
+};
+
+static int __init mpc836x_rdk_declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc836x_rdk))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc836x_rdk_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc836x_rdk_declare_of_platform_devices);
+
+static void __init mpc836x_rdk_setup_arch(void)
+{
+	struct device_node *np;
+
+	if (ppc_md.progress)
+		ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
+
+#ifdef CONFIG_PCI
+	for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+		mpc83xx_add_bridge(np);
+#endif
+
+#ifdef CONFIG_QUICC_ENGINE
+	qe_reset();
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,qe-pario");
+	if (np) {
+		par_io_init(np);
+		of_node_put(np);
+	} else {
+		pr_warning("QE PIO not initialized!\n");
+	}
+#endif
+}
+
+static void __init mpc836x_rdk_init_IRQ(void)
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
+	if (!np)
+		return;
+
+	ipic_init(np, 0);
+
+	/*
+	 * Initialize the default interrupt mapping priorities,
+	 * in case the boot rom changed something on us.
+	 */
+	ipic_set_default_priority();
+	of_node_put(np);
+
+#ifdef CONFIG_QUICC_ENGINE
+	np = of_find_compatible_node(NULL, NULL, "fsl,qe-pic");
+	if (!np)
+		return;
+
+	qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
+	of_node_put(np);
+#endif
+}
+
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened.
+ */
+static int __init mpc836x_rdk_probe(void)
+{
+	unsigned long root = of_get_flat_dt_root();
+
+	return of_flat_dt_is_compatible(root, "MPC836xRDK");
+}
+
+define_machine(mpc836x_rdk) {
+	.name		= "MPC836x RDK",
+	.probe		= mpc836x_rdk_probe,
+	.setup_arch	= mpc836x_rdk_setup_arch,
+	.init_IRQ	= mpc836x_rdk_init_IRQ,
+	.get_irq	= ipic_get_irq,
+	.restart	= mpc83xx_restart,
+	.time_init	= mpc83xx_time_init,
+	.calibrate_decr	= generic_calibrate_decr,
+	.progress	= udbg_progress,
+};
-- 
1.5.2.2

^ permalink raw reply related

* Re: [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Kumar Gala @ 2007-12-19 20:54 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071219203817.GD20861@localhost.localdomain>


On Dec 19, 2007, at 2:38 PM, Anton Vorontsov wrote:

> Also rename "fsl_spi" to "fsl,spi".
>
> Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8313erdb.dts    |    3 +--
> arch/powerpc/boot/dts/mpc832x_mds.dts    |    6 ++----
> arch/powerpc/boot/dts/mpc832x_rdb.dts    |    6 ++----
> arch/powerpc/boot/dts/mpc8349emitx.dts   |    3 +--
> arch/powerpc/boot/dts/mpc8349emitxgp.dts |    3 +--
> arch/powerpc/boot/dts/mpc834x_mds.dts    |    3 +--
> arch/powerpc/boot/dts/mpc836x_mds.dts    |    6 ++----
> arch/powerpc/boot/dts/mpc8568mds.dts     |    6 ++----
> arch/powerpc/sysdev/fsl_soc.c            |    2 +-
> 9 files changed, 13 insertions(+), 25 deletions(-)


can you add cell-index as well.

- k

^ permalink raw reply

* Re: [PATCH 0/4] device_type/compatible cleanups
From: Anton Vorontsov @ 2007-12-19 20:48 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <47698054.1060909@freescale.com>

On Wed, Dec 19, 2007 at 02:34:28PM -0600, Scott Wood wrote:
> Anton Vorontsov wrote:
> >Scott, I didn't add "fsl,cpm-muram" stuff, it just doesn't make
> >sense now: qe and cpm anyway using different code base.
> 
> That should change.

Sure. When that will change, then it will be sane to change the users,
I think. ;-) Not the vice versa.

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

^ permalink raw reply

* [PATCH 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
From: Anton Vorontsov @ 2007-12-19 20:38 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <20071219203447.GA18285@localhost.localdomain>

Also rename "fsl_spi" to "fsl,spi".

Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc8313erdb.dts    |    3 +--
 arch/powerpc/boot/dts/mpc832x_mds.dts    |    6 ++----
 arch/powerpc/boot/dts/mpc832x_rdb.dts    |    6 ++----
 arch/powerpc/boot/dts/mpc8349emitx.dts   |    3 +--
 arch/powerpc/boot/dts/mpc8349emitxgp.dts |    3 +--
 arch/powerpc/boot/dts/mpc834x_mds.dts    |    3 +--
 arch/powerpc/boot/dts/mpc836x_mds.dts    |    6 ++----
 arch/powerpc/boot/dts/mpc8568mds.dts     |    6 ++----
 arch/powerpc/sysdev/fsl_soc.c            |    2 +-
 9 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index c5b6665..127cf57 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -82,8 +82,7 @@
 		};
 
 		spi@7000 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <7000 1000>;
 			interrupts = <10 8>;
 			interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 97757ed..517e433 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -192,8 +192,7 @@
 		};
 
 		spi@4c0 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <4c0 40>;
 			interrupts = <2>;
 			interrupt-parent = < &qeic >;
@@ -201,8 +200,7 @@
 		};
 
 		spi@500 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <500 40>;
 			interrupts = <1>;
 			interrupt-parent = < &qeic >;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index b1c73f1..a229fab 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -182,8 +182,7 @@
 		};
 
 		spi@4c0 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <4c0 40>;
 			interrupts = <2>;
 			interrupt-parent = <&qeic>;
@@ -191,8 +190,7 @@
 		};
 
 		spi@500 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <500 40>;
 			interrupts = <1>;
 			interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index e354f26..b89dbbf 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -82,8 +82,7 @@
 		};
 
 		spi@7000 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <7000 1000>;
 			interrupts = <10 8>;
 			interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index ebdf0b7..123c34e 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -80,8 +80,7 @@
 		};
 
 		spi@7000 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <7000 1000>;
 			interrupts = <10 8>;
 			interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 0ba13eb..eb532f3 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -93,8 +93,7 @@
 		};
 
 		spi@7000 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <7000 1000>;
 			interrupts = <10 8>;
 			interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 330212d..decbafe 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -223,8 +223,7 @@
 		};
 
 		spi@4c0 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <4c0 40>;
 			interrupts = <2>;
 			interrupt-parent = < &qeic >;
@@ -232,8 +231,7 @@
 		};
 
 		spi@500 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <500 40>;
 			interrupts = <1>;
 			interrupt-parent = < &qeic >;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index c00aec9..2b79f8b 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -300,8 +300,7 @@
 		};
 
 		spi@4c0 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <4c0 40>;
 			interrupts = <2>;
 			interrupt-parent = <&qeic>;
@@ -309,8 +308,7 @@
 		};
 
 		spi@500 {
-			device_type = "spi";
-			compatible = "fsl_spi";
+			compatible = "fsl,spi";
 			reg = <500 40>;
 			interrupts = <1>;
 			interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3cf84d0..91bac51 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1242,7 +1242,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
 	}
 
 	for (np = NULL, i = 1;
-	     (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
+	     (np = of_find_compatible_node(np, NULL, "fsl,spi")) != NULL;
 	     i++) {
 		int ret = 0;
 		unsigned int j;
-- 
1.5.2.2

^ permalink raw reply related

* [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE
From: Anton Vorontsov @ 2007-12-19 20:38 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, spi-devel-general
In-Reply-To: <20071219203447.GA18285@localhost.localdomain>

In case of QE we can use brg-frequency (which is qeclk/2).
Thus no need to divide sysclk in the spi_mpc83xx.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/sysdev/fsl_soc.c |   18 +++++++++++-------
 drivers/spi/spi_mpc83xx.c     |    6 +-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 044dd7f..3cf84d0 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1227,15 +1227,19 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
 
 	/* SPI controller is either clocked from QE or SoC clock */
 	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
-	if (!np)
+	if (np) {
+		sysclk = of_get_property(np, "brg-frequency", NULL);
+		if (!sysclk)
+			return -ENODEV;
+	} else {
 		np = of_find_node_by_type(NULL, "soc");
+		if (!np)
+			return -ENODEV;
 
-	if (!np)
-		return -ENODEV;
-
-	sysclk = of_get_property(np, "bus-frequency", NULL);
-	if (!sysclk)
-		return -ENODEV;
+		sysclk = of_get_property(np, "bus-frequency", NULL);
+		if (!sysclk)
+			return -ENODEV;
+	}
 
 	for (np = NULL, i = 1;
 	     (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 4580b9c..04f7cd9 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -436,11 +436,7 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
 	mpc83xx_spi->qe_mode = pdata->qe_mode;
 	mpc83xx_spi->get_rx = mpc83xx_spi_rx_buf_u8;
 	mpc83xx_spi->get_tx = mpc83xx_spi_tx_buf_u8;
-
-	if (mpc83xx_spi->qe_mode)
-		mpc83xx_spi->spibrg = pdata->sysclk / 2;
-	else
-		mpc83xx_spi->spibrg = pdata->sysclk;
+	mpc83xx_spi->spibrg = pdata->sysclk;
 
 	mpc83xx_spi->rx_shift = 0;
 	mpc83xx_spi->tx_shift = 0;
-- 
1.5.2.2

^ permalink raw reply related

* [PATCH 2/4] [POWERPC][NET] ucc_geth_mii and users: get rid of device_type
From: Anton Vorontsov @ 2007-12-19 20:37 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Li Yang, Jeff Garzik, netdev
In-Reply-To: <20071219203447.GA18285@localhost.localdomain>

device_type property is bogus, better use proper compatible property.

Also change compatible to "fsl,ucc-mdio".

Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc832x_mds.dts |    3 +--
 arch/powerpc/boot/dts/mpc832x_rdb.dts |    3 +--
 arch/powerpc/boot/dts/mpc836x_mds.dts |    3 +--
 arch/powerpc/boot/dts/mpc8568mds.dts  |    2 +-
 drivers/net/ucc_geth_mii.c            |    3 +--
 5 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index ef8cd1e..97757ed 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -254,8 +254,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <2320 18>;
-			device_type = "mdio";
-			compatible = "ucc_geth_phy";
+			compatible = "fsl,ucc-mdio";
 
 			phy3: ethernet-phy@03 {
 				interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 7c4f028..b1c73f1 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -235,8 +235,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <3120 18>;
-			device_type = "mdio";
-			compatible = "ucc_geth_phy";
+			compatible = "fsl,ucc-mdio";
 
 			phy00:ethernet-phy@00 {
 				interrupt-parent = <&pic>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 5c73786..330212d 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -287,8 +287,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <2120 18>;
-			device_type = "mdio";
-			compatible = "ucc_geth_phy";
+			compatible = "fsl,ucc-mdio";
 
 			phy0: ethernet-phy@00 {
 				interrupt-parent = < &ipic >;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 7ad4b9f..c00aec9 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -355,7 +355,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <2120 18>;
-			compatible = "ucc_geth_phy";
+			compatible = "fsl,ucc-mdio";
 
 			/* These are the same PHYs as on
 			 * gianfar's MDIO bus */
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index df884f0..de8ba1f 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/drivers/net/ucc_geth_mii.c
@@ -253,8 +253,7 @@ int uec_mdio_remove(struct of_device *ofdev)
 
 static struct of_device_id uec_mdio_match[] = {
 	{
-		.type = "mdio",
-		.compatible = "ucc_geth_phy",
+		.compatible = "fsl,ucc-mdio",
 	},
 	{},
 };
-- 
1.5.2.2

^ permalink raw reply related

* [PATCH 1/4] [POWERPC] qe_lib and users: get rid of device_type and model
From: Anton Vorontsov @ 2007-12-19 20:37 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <20071219203447.GA18285@localhost.localdomain>

Now we're searching for "fsl,qe", "fsl,qe-muram", "fsl,qe-muram-data".

Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc832x_mds.dts |    6 +++---
 arch/powerpc/boot/dts/mpc832x_rdb.dts |    6 +++---
 arch/powerpc/boot/dts/mpc836x_mds.dts |    6 +++---
 arch/powerpc/boot/dts/mpc8568mds.dts  |    6 +++---
 arch/powerpc/sysdev/fsl_soc.c         |    2 +-
 arch/powerpc/sysdev/qe_lib/qe.c       |    7 ++++---
 6 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 26ac467..ef8cd1e 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -175,18 +175,18 @@
 	qe@e0100000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		device_type = "qe";
-		model = "QE";
+		compatible = "fsl,qe";
 		ranges = <0 e0100000 00100000>;
 		reg = <e0100000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <BCD3D80>;
 
 		muram@10000 {
-			device_type = "muram";
+			compatible = "fsl,qe-muram";
 			ranges = <0 00010000 00004000>;
 
 			data-only@0 {
+				compatible = "fsl,qe-muram-data";
 				reg = <0 4000>;
 			};
 		};
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 10ff7aa..7c4f028 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -165,18 +165,18 @@
 	qe@e0100000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		device_type = "qe";
-		model = "QE";
+		compatible = "fsl,qe";
 		ranges = <0 e0100000 00100000>;
 		reg = <e0100000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <BCD3D80>;
 
 		muram@10000 {
-			device_type = "muram";
+			compatible = "fsl,qe-muram";
 			ranges = <0 00010000 00004000>;
 
 			data-only@0 {
+				compatible = "fsl,qe-muram-data";
 				reg = <0 4000>;
 			};
 		};
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index fd841b2..5c73786 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -206,18 +206,18 @@
 	qe@e0100000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		device_type = "qe";
-		model = "QE";
+		compatible = "fsl,qe";
 		ranges = <0 e0100000 00100000>;
 		reg = <e0100000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <179A7B00>;
 
 		muram@10000 {
-			device_type = "muram";
+			device_type = "fsl,qe-muram";
 			ranges = <0 00010000 0000c000>;
 
 			data-only@0{
+				device_type = "fsl,qe-muram-data";
 				reg = <0 c000>;
 			};
 		};
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 5818a7c..7ad4b9f 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -283,18 +283,18 @@
 	qe@e0080000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		device_type = "qe";
-		model = "QE";
+		compatible = "fsl,qe";
 		ranges = <0 e0080000 00040000>;
 		reg = <e0080000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <179A7B00>;
 
 		muram@10000 {
-			device_type = "muram";
+			compatible = "fsl,qe-muram";
 			ranges = <0 00010000 0000c000>;
 
 			data-only@0{
+				compatible = "fsl,qe-muram-data";
 				reg = <0 c000>;
 			};
 		};
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 4baad80..044dd7f 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1226,7 +1226,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
 	const u32 *sysclk;
 
 	/* SPI controller is either clocked from QE or SoC clock */
-	np = of_find_node_by_type(NULL, "qe");
+	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
 	if (!np)
 		np = of_find_node_by_type(NULL, "soc");
 
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 21e0106..4af71e1 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -68,7 +68,7 @@ phys_addr_t get_qe_base(void)
 	if (qebase != -1)
 		return qebase;
 
-	qe = of_find_node_by_type(NULL, "qe");
+	qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
 	if (qe) {
 		unsigned int size;
 		const void *prop = of_get_property(qe, "reg", &size);
@@ -155,7 +155,7 @@ unsigned int get_brg_clk(void)
 	if (brg_clk)
 		return brg_clk;
 
-	qe = of_find_node_by_type(NULL, "qe");
+	qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
 	if (qe) {
 		unsigned int size;
 		const u32 *prop = of_get_property(qe, "brg-frequency", &size);
@@ -334,7 +334,8 @@ static void qe_muram_init(void)
 	/* XXX: This is a subset of the available muram. It
 	 * varies with the processor and the microcode patches activated.
 	 */
-	if ((np = of_find_node_by_name(NULL, "data-only")) != NULL) {
+	np = of_find_compatible_node(NULL, NULL, "fsl,qe-muram-data");
+	if (np) {
 		address = *of_get_address(np, 0, &size, &flags);
 		of_node_put(np);
 		rh_attach_region(&qe_muram_info, address, (int) size);
-- 
1.5.2.2

^ permalink raw reply related

* Re: [PATCH 0/4] device_type/compatible cleanups
From: Scott Wood @ 2007-12-19 20:34 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071219203447.GA18285@localhost.localdomain>

Anton Vorontsov wrote:
> Scott, I didn't add "fsl,cpm-muram" stuff, it just doesn't make
> sense now: qe and cpm anyway using different code base.

That should change.

-Scott

^ permalink raw reply

* Re: [PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
From: Benjamin Herrenschmidt @ 2007-12-19 20:26 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev
In-Reply-To: <47691DE6.8050901@ru.mvista.com>


On Wed, 2007-12-19 at 16:34 +0300, Valentine Barshak wrote:

> > --- linux-work.orig/arch/powerpc/boot/dts/bamboo.dts	2007-12-10 15:56:59.000000000 +1100
> > +++ linux-work/arch/powerpc/boot/dts/bamboo.dts	2007-12-10 16:39:51.000000000 +1100
> > @@ -239,10 +239,48 @@
> >  				zmii-channel = <1>;
> >  			};
> >  		};
> > +
> > +		PCI0: pci@ec000000 {
> > +			device_type = "pci";
> > +			#interrupt-cells = <1>;
> > +			#size-cells = <2>;
> > +			#address-cells = <3>;
> > +			compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
> > +			primary;
> > +			reg = <0 eec00000 8	/* Config space access */
> > +			       0 eed80000 4	/* IACK */
> > +			       0 eed80000 4	/* Special cycle */
> > +			       0 ef480000 40>;	/* Internal registers */
> 
> Why ef480000 here? IIRC, the docs say it should be ef400000, while 
> ef400040 - ef4fffff are reserved and can mirror local registers.

Dunno... probably a typo, though it worked :-) I'll fix it up.

Ben.

^ permalink raw reply

* [PATCH 0/4] device_type/compatible cleanups
From: Anton Vorontsov @ 2007-12-19 20:34 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

Hi all,

Here are few cleanups purposed by David Gibson and Scott Wood:
http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html

Patches are well split and bisect-able.

Scott, I didn't add "fsl,cpm-muram" stuff, it just doesn't make
sense now: qe and cpm anyway using different code base.

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

^ permalink raw reply

* tiny login
From: pjmaiya @ 2007-12-19 13:11 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

hi,
I am using tiny login provided by montavista. Binaries already obtained from tool provided from montavista.We are able to add only 10 users. But I need to add more than 10 users.
I have already downloaded free open source for tinylogin (tinylogin-1.4). Can we modifiy this source code of this version and support users more than 10??
If yes, can somebody inform step to build tiny login and installation method.

thanx in advance
pjmaiya

[-- Attachment #2: Type: text/html, Size: 1038 bytes --]

^ permalink raw reply

* Re: Linux on Freescale e200
From: Kumar Gala @ 2007-12-19 17:36 UTC (permalink / raw)
  To: Per-Erik Johansson; +Cc: linuxppc-dev
In-Reply-To: <5797.213.15.68.47.1198072613.squirrel@webmail.chalmers.se>


On Dec 19, 2007, at 7:56 AM, Per-Erik Johansson wrote:

> Hi
>
> I'm wondering if someone has ever tried to get Linux running on a
> Freescale e200 core?
> I found a patch to the Linux kernel from back in 2005:
> (http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-06/5731.html)
> And it is listed as a processor type in Linux-2.6.23.11
> I know that there has been some confusion about e200 and e500 cores,  
> old
> e200 renamed to e500, but from what I understand the e200 core now  
> listed
> in the kernel is the one currently being used in MPC55xx
>
> I'm having a MPC5554, e200z6 core, that I'm supposed to get Linux  
> running
> on (master thesis) and any pointers and tips are appreciated.
> Just finished porting/tweaking the Redboot boot loader, and I'm now  
> moving
> on to the Linux (porting?) part.

I'd suggest looking at getting u-boot running instead since that's we  
use on the majority of freescale PPCs.

We did a port a while back to the e200.. so most of the basic bits  
should be there.  There might be some bit rot from its like of usage.

What peripheral set are you looking to get working on the 5554?

- k

^ permalink raw reply

* [RFC] [PATCH 2/3] Rework arch specific Makefiles to use mkimage
From: Josh Boyer @ 2007-12-19 16:38 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071219103351.6c4468f4@zod.rchland.ibm.com>

Rework the architecture specific Makefiles to use the in-kernel version
of the mkimage tool.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/arm/boot/Makefile          |    4 ++--
 arch/avr32/boot/images/Makefile |    4 ++--
 arch/blackfin/boot/Makefile     |    4 ++--
 arch/powerpc/boot/Makefile      |    8 ++++++--
 arch/powerpc/boot/wrapper       |    2 +-
 arch/ppc/boot/images/Makefile   |    4 ++--
 arch/sh/boot/Makefile           |    4 ++--
 7 files changed, 17 insertions(+), 13 deletions(-)

--- linux-2.6.orig/arch/arm/boot/Makefile
+++ linux-2.6/arch/arm/boot/Makefile
@@ -11,7 +11,7 @@
 # Copyright (C) 1995-2002 Russell King
 #
 
-MKIMAGE         := $(srctree)/scripts/mkuboot.sh
+MKIMAGE         := $(srctree)/scripts/mkimage/mkimage
 
 ifneq ($(MACHINE),)
 include $(srctree)/$(MACHINE)/Makefile.boot
@@ -60,7 +60,7 @@ $(obj)/zImage:	$(obj)/compressed/vmlinux
 endif
 
 quiet_cmd_uimage = UIMAGE  $@
-      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T
kernel \
+      cmd_uimage = $(MKIMAGE) -A arm -O linux -T kernel \
 		   -C none -a $(ZRELADDR) -e $(ZRELADDR) \
 		   -n 'Linux-$(KERNELRELEASE)' -d $< $@
 
--- linux-2.6.orig/arch/avr32/boot/images/Makefile
+++ linux-2.6/arch/avr32/boot/images/Makefile
@@ -6,7 +6,7 @@
 # for more details.
 #
 
-MKIMAGE		:= $(srctree)/scripts/mkuboot.sh
+MKIMAGE		:= $(srctree)/scripts/mkimage/mkimage
 
 extra-y		:= vmlinux.bin vmlinux.gz
 
@@ -18,7 +18,7 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FO
 	$(call if_changed,gzip)
 
 quiet_cmd_uimage = UIMAGE $@
-      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A avr32 -O linux -T
kernel	\
+      cmd_uimage = $(MKIMAGE) -A avr32 -O linux -T kernel	\
 		-C gzip -a $(CONFIG_LOAD_ADDRESS) -e
$(CONFIG_ENTRY_ADDRESS)	\ -n 'Linux-$(KERNELRELEASE)' -d $< $@
 
--- linux-2.6.orig/arch/blackfin/boot/Makefile
+++ linux-2.6/arch/blackfin/boot/Makefile
@@ -6,13 +6,13 @@
 # for more details.
 #
 
-MKIMAGE := $(srctree)/scripts/mkuboot.sh
+MKIMAGE := $(srctree)/scripts/mkimage/mkimage
 
 targets := vmImage
 extra-y += vmlinux.bin vmlinux.gz
 
 quiet_cmd_uimage = UIMAGE  $@
-      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T
kernel \
+      cmd_uimage = $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
                    -C gzip -n 'Linux-$(KERNELRELEASE)' -a
$(CONFIG_BOOT_LOAD) \ -e $(shell $(NM) vmlinux | awk '$$NF ==
"__start" {print $$1}') \ -d $< $@
--- linux-2.6.orig/arch/ppc/boot/images/Makefile
+++ linux-2.6/arch/ppc/boot/images/Makefile
@@ -2,7 +2,7 @@
 # This dir holds all of the images for PPC machines.
 # Tom Rini	January 2001
 
-MKIMAGE		:= $(srctree)/scripts/mkuboot.sh
+MKIMAGE		:= $(srctree)/scripts/mkimage/mkimage
 
 extra-y		:= vmlinux.bin vmlinux.gz
 
@@ -19,7 +19,7 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FO
 	$(call if_changed,mygzip)
 
 quiet_cmd_uimage = UIMAGE  $@
-      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T
kernel \
+      cmd_uimage = $(MKIMAGE) -A ppc -O linux -T kernel \
                -C gzip -a 00000000 -e 00000000 -n
'Linux-$(KERNELRELEASE)' \ -d $< $@
 
--- linux-2.6.orig/arch/sh/boot/Makefile
+++ linux-2.6/arch/sh/boot/Makefile
@@ -8,7 +8,7 @@
 # Copyright (C) 1999 Stuart Menefy
 #
 
-MKIMAGE := $(srctree)/scripts/mkuboot.sh
+MKIMAGE := $(srctree)/scripts/mkimage/mkimage
 
 #
 # Assign safe dummy values if these variables are not defined,
@@ -38,7 +38,7 @@ KERNEL_LOAD	:= $(shell /bin/bash -c 'pri
 			$(CONFIG_ZERO_PAGE_OFFSET)+0x1000]')
 
 quiet_cmd_uimage = UIMAGE  $@
-      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel
\
+      cmd_uimage = $(MKIMAGE) -A sh -O linux -T kernel \
 		   -C none -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
 		   -n 'Linux-$(KERNELRELEASE)' -d $< $@
 
--- linux-2.6.orig/arch/powerpc/boot/wrapper
+++ linux-2.6/arch/powerpc/boot/wrapper
@@ -259,7 +259,7 @@ coff)
     ;;
 cuboot*)
     gzip -f -9 "$ofile"
-    mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
+    $objbin/mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e
"$entry" \ $uboot_version -d "$ofile".gz "$ofile"
     ;;
 treeboot*)
--- linux-2.6.orig/arch/powerpc/boot/Makefile
+++ linux-2.6/arch/powerpc/boot/Makefile
@@ -123,7 +123,7 @@ extra-y		:= $(obj)/wrapper.a
$(obj-plat) $(obj)/zImage.lds $(obj)/zImage.coff.lds
$(obj)/zImage.ps3.lds 
 wrapper		:=$(srctree)/$(src)/wrapper
-wrapperbits	:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff
mktree) \ +wrapperbits	:= $(extra-y) $(addprefix $(obj)/,addnote
hack-coff mktree mkimage) \ $(wrapper) FORCE
 
 #############
@@ -197,6 +197,7 @@ dts = $(if $(shell echo $(CONFIG_DEVICE_
 endif
 endif
 
+
 # Don't put the ramdisk on the pattern rule; when its missing make
will try # the pattern rule with less dependencies that also matches
(even with the # hard dependency listed).
@@ -246,9 +247,12 @@ $(obj)/zImage.initrd:	$(addprefix $(obj)
 install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
 	sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux
System.map "$(INSTALL_PATH)" $< 
+$(obj)/mkimage:
+	ln -s $(srctree)/scripts/mkimage/mkimage $(obj)/mkimage
+
 # anything not in $(targets)
 clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.*
treeImage.* \
-	otheros.bld
+	otheros.bld mkimage
 
 # clean up files cached by wrapper
 clean-kernel := vmlinux.strip vmlinux.bin

^ permalink raw reply


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