LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
From: Grant Likely @ 2007-10-03  4:18 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1191365012.22572.33.camel@pasglop>

On 10/2/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > My opinion is that since it is driver-specific code anyway, then it
> > belongs with the driver.  Plus a driver writer for ARM doesn't need to
> > write them.  It's the powerpc or microblaze developer who will do it.
> > If the driver maintainer doesn't want the binding in the main driver
> > .c file, then the binding can easily be in an additional .c file
> > without needing to add a constructor.  (Kind of like how many USB host
> > controllers are managed)
>
> The main advantage is that it keeps the OF specific code localized to a
> single function, whether that function lives in the driver or the arch
> code, it makes it self contained and easier to deal with by the driver
> author.
>
> Having multiple device types on which the driver can attach is a pain
> from a driver standpoint. It needs multiple
> probe/remove/suspend/resume/shutdown hooks etc... it's a bigger
> maintainance burden in the long run.

For many drivers, I think that is already the case.  USB OHCI is a
prime example where there are both PCI and platform_bus bindings among
others.  It seems to me that the bus binding effectively translates
down to "where do I go to get the needed information".  I think it
results in less of a maintenance burden to explicitly separate bus
binding from device setup as opposed to adding constructor code.

> The important thing however, with the constructor approach is to try as
> much as possible to keep the proper tree structure, and thus, try to
> find a way to instanciate the devices with proper parent/child
> relationship so that ordering for things like suspend/resume operations
> is maintained.

I'm not sure I follow.  Example?

Thanks,
g.

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

^ permalink raw reply

* Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
From: Benjamin Herrenschmidt @ 2007-10-03  4:24 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40710022118r170ab652mdd65c216304b3330@mail.gmail.com>


On Tue, 2007-10-02 at 22:18 -0600, Grant Likely wrote:

> For many drivers, I think that is already the case.  USB OHCI is a
> prime example where there are both PCI and platform_bus bindings among
> others.  It seems to me that the bus binding effectively translates
> down to "where do I go to get the needed information".  I think it
> results in less of a maintenance burden to explicitly separate bus
> binding from device setup as opposed to adding constructor code.

I think nobody consider the mess that is USB in that are to be something
we want to reproduce.

> > The important thing however, with the constructor approach is to try as
> > much as possible to keep the proper tree structure, and thus, try to
> > find a way to instanciate the devices with proper parent/child
> > relationship so that ordering for things like suspend/resume operations
> > is maintained.
> 
> I'm not sure I follow.  Example?

Well, make sure that if 2 platform devices repreesnt respectively a bus
and a device on that bus, they properly get instanciated as parent &
child in sysfs as well.

Ben.

^ permalink raw reply

* Re: [PATCH v3 2/4] Implement generic time of day clocksource for powerpc machines.
From: Thomas Gleixner @ 2007-10-03  4:00 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: linuxppc-dev, John Stultz, Realtime Kernel, Stephen Rothwell
In-Reply-To: <18178.59123.511480.956928@cargo.ozlabs.ibm.com>

On Wed, 3 Oct 2007, Paul Mackerras wrote:

> Tony Breeds writes:
> 
> > @@ -982,6 +906,10 @@ void __init time_init(void)
> >  
> >  	write_sequnlock_irqrestore(&xtime_lock, flags);
> >  
> > +	/* Register the clocksource, if we're not running on iSeries */
> > +	if (!firmware_has_feature(FW_FEATURE_ISERIES))
> > +		clocksource_init();
> 
> This breaks the 32-bit compile.
> 
> Is it possible to adjust the frequency of a clocksource after it has
> been registered?  Or could the timebase clocksource be unregistered
> and reregistered in iSeries_tb_recal?

There is no unregister interface right now. But we need some mechanism to 
tell the core code that you changed it. I have a look if John does not 
beat me.

	tglx

^ permalink raw reply

* [PATCH] Use cache-inhibited large page bit from firmware
From: Paul Mackerras @ 2007-10-03  4:41 UTC (permalink / raw)
  To: linuxppc-dev

Discussions with firmware architects have confirmed that the bit in
the ibm,pa-features property that indicates support for
cache-inhibited large (>= 64kB) page mappings does in fact mean that
the hypervisor allows 64kB mappings to I/O devices.

Thus we can now enable the code that tests that bit and sets our
CPU_FTR_CI_LARGE_PAGE feature bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 172dcc3..9f329a8 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -531,10 +531,7 @@ static struct ibm_pa_feature {
 	{CPU_FTR_CTRL, 0,		0, 3, 0},
 	{CPU_FTR_NOEXECUTE, 0,		0, 6, 0},
 	{CPU_FTR_NODSISRALIGN, 0,	1, 1, 1},
-#if 0
-	/* put this back once we know how to test if firmware does 64k IO */
 	{CPU_FTR_CI_LARGE_PAGE, 0,	1, 2, 0},
-#endif
 	{CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0},
 };
 

^ permalink raw reply related

* Re: jffs2 file system on MPC8272ADS
From: Nethra @ 2007-10-03  4:45 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <46FBD7FE.6050500@freescale.com>


Scott,

>Most common is making a jffs2 filesystem with the wrong block size.  It 
>could also be an incorrect flash mapping.

 In our case erase block size and flash mapping seems to be correct.

> Was it the physmap driver or the pq2fads driver that found the flash?
>        
>              Flash is cfi compatible.
>>That's not what I meant...  you have two mapping drivers enabled, and 
>>the pq2fads driver might be doing something other that what you 
>>specified to physmap.  I'd just disable it.

I think if flash is cfi compatible then it uses default driver.




_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded



-- 
View this message in context: http://www.nabble.com/jffs2-file-system-on-MPC8272ADS-tf4513571.html#a13012850
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

^ permalink raw reply

* [PATCH] Fail early in lmb_remove_region()
From: Michael Ellerman @ 2007-10-03  4:52 UTC (permalink / raw)
  To: linuxppc-dev

There was a query a while back about whether lmb_remove_region() was
correct to unconditionally decrement rgn->cnt:
  http://ozlabs.org/pipermail/linuxppc-dev/2007-March/033261.html

AFAICT there is no bug at the moment because the two callers ensure that
they only pass a value of r which is < rgn->cnt. However there's the
potential for a bug if a caller got that wrong. So to avoid such a bug
in future we should fail in lmb_remove_region() if the r value is out of
range.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/mm/lmb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 8f4d2dc..e79e055 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -92,6 +92,8 @@ static void __init lmb_remove_region(struct lmb_region *rgn, unsigned long r)
 {
 	unsigned long i;
 
+	BUG_ON(r >= rgn->cnt);
+
 	for (i = r; i < rgn->cnt - 1; i++) {
 		rgn->region[i].base = rgn->region[i + 1].base;
 		rgn->region[i].size = rgn->region[i + 1].size;
-- 
1.5.1.3.g7a33b

^ permalink raw reply related

* Re: [PATCH 8/15] bootwrapper: convert flatdevtree to version 16
From: David Gibson @ 2007-10-03  5:29 UTC (permalink / raw)
  To: Milton Miller; +Cc: ppcdev
In-Reply-To: <61d44782a59ff62300416fbed26236f0@bga.com>

On Fri, Sep 28, 2007 at 10:16:51AM -0500, Milton Miller wrote:
[snip]
> Actually, there is another approach: put this converter in kexec's  
> purgatory or even the kexec program.  It can then run conditionally  
> under command line flags to keep compatibility with the old kernels.   
> If and when its is decided to only support >=v16 in kexec-tools it can  
> be removed and we don't have this interim support code in the kernel  
> forever (I'll handle my other usage out of tree).

Hurrah!  Well, please do that then.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [RFC] [PATCH] PowerPC: add more than 4MB kernel image size support to bootwarapper
From: David Gibson @ 2007-10-03  5:50 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev
In-Reply-To: <46FD0E4D.30305@ru.mvista.com>

On Fri, Sep 28, 2007 at 06:23:09PM +0400, Valentine Barshak wrote:
> David Gibson wrote:
> > On Mon, Sep 24, 2007 at 03:36:27PM +0400, Valentine Barshak wrote:
> >> Currently zImage is linked at the 4MB base address.
> >> Some platforms (using cuboot, treeboot) need the zImage's
> >> entry point and base address. They place zImage exactly
> >> at the base address it's been linked to. Sometimes 4MB left
> >> at the start of the memory is simply not enough to unpack zImage.
> >> This could happen with initramfs enabled, since the kernel image
> >> packed along with initramfs.cpio could be over 5MB in size.
> >> This patch checks vmlinux image size and links zImage at
> >> the base address that is equal to the unpacked image size
> >> aligned to 4MB boundary. This way zImage base address is 4MB
> >> only if unpacked kernel image size is less then 4MB.
> > 
> > Good plan.  However..
> > 
> > [snip]
> >> diff -ruN linux-2.6.orig/arch/powerpc/boot/zImage.lds.S linux-2.6/arch/powerpc/boot/zImage.lds.S
> >> --- linux-2.6.orig/arch/powerpc/boot/zImage.lds.S	2007-09-22 00:48:08.000000000 +0400
> >> +++ linux-2.6/arch/powerpc/boot/zImage.lds.S	2007-09-22 04:03:58.000000000 +0400
> >> @@ -3,7 +3,7 @@
> >>  EXTERN(_zimage_start)
> >>  SECTIONS
> >>  {
> >> -  . = (4*1024*1024);
> >> +  . = ALIGN((_kend - _kstart), (4*1024*1024));
> > 
> > ..I don't see any reason to keep the 4MB granularity.  I would just
> > align the address to say a 64k boundary (64k because that's the
> > granularity used in the normal ABI).
> 
> Looking deeper at this I've found that currently u-boot thinks that 
> memory space over 8MB is not reached by Linux kernel (CFG_BOOTMAPSZ 
> defined as (8 << 20)), although all physical memory is identity mapped. 
> That's why it puts command line and board info structure as high as 
> possible within the first 8MB. This worked fine with uImage, since 
> u-boot always unpacked it to 0. Now, cuImage has to be unpacked higher 
> (we need space at the start of the memory to eventually put vmlinux 
> image there). So, if unpacked kernel image crosses 8MB boundary, it gets 
> damaged by u-boot when it prepares cmd_line and bdinfo. The possible 
> workaround for that is to always link zImage at >=8MB base or to have 
> 4MB granularity like this:
> 
> +  . = ALIGN((_kend - _kstart + 64*1024), (4*1024*1024));
> 
> Reserve at least 64K for u-boot cmd_line and bdinfo.

Ah.  Right.  That makes things a bit tricky.  Even this 4MB
granularity may not be enough (say, if the vmlinux is < 4MB, but the
zImage has a really big initrd and is > 4MB).

Except... it shouldn't really be the link address that matters.  The
zImage is relocatable, so it should only be the load address specified
in the uImage header which matters.  I think that's currently derived
from the link address, but it doesn't have to be.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* dtc: Refactor Makefiles
From: David Gibson @ 2007-10-03  5:59 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

This patch makes a number of Makefile cleanups and improvements:
	- We use more generic rules to invoke flex and bison, which is
useful for some of the other changes.
	- We use the name dtc-lexer.lex.c for the flex output, instead
of the default lex.yy.c.  That means less potential for confusion if
dtc is embedded into other projects (e.g. the kernel).
	- We separate out a Makefile.dtc designed for embedding into
other projects, analagous to Makefile.libfdt.
	- Makefile.libfdt is cleaned up to be more useful based on
some actual trial runs of embedding libfdt in the kernel bootwrapper.
	- Versioning related rules and variables are collected into
one place in the Makefile.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile	2007-09-27 14:08:05.000000000 +1000
+++ dtc/Makefile	2007-09-27 14:32:49.000000000 +1000
@@ -15,40 +15,12 @@ EXTRAVERSION =
 LOCAL_VERSION =
 CONFIG_LOCALVERSION =
 
-DTC_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-VERSION_FILE = version_gen.h
-
-CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
-	  else if [ -x /bin/bash ]; then echo /bin/bash; \
-	  else echo sh; fi ; fi)
-
-nullstring :=
-space	:= $(nullstring) # end of line
-
-localver_config = $(subst $(space),, $(string) \
-			      $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
-
-localver_cmd = $(subst $(space),, $(string) \
-			      $(patsubst "%",%,$(LOCALVERSION)))
-
-localver_scm = $(shell $(CONFIG_SHELL) ./scripts/setlocalversion)
-localver_full  = $(localver_config)$(localver_cmd)$(localver_scm)
-
-dtc_version = $(DTC_VERSION)$(localver_full)
-
-#
-# Contents of the generated version file.
-#
-define filechk_version
-	(echo "#define DTC_VERSION \"DTC $(dtc_version)\""; )
-endef
-
-
 CPPFLAGS = -I libfdt
 CFLAGS = -Wall -g -Os
 LDFLAGS = -Llibfdt
 
 BISON = bison
+LEX = flex
 
 INSTALL = /usr/bin/install
 DESTDIR =
@@ -77,52 +49,107 @@ endif
 
 all: dtc ftdump libfdt tests
 
+install: all
+	@$(VECHO) INSTALL
+	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+	$(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+	$(INSTALL) -m 644 $(LIBFDT_LIB) $(DESTDIR)$(LIBDIR)
+	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL) -m 644 $(LIBFDT_INCLUDES) $(DESTDIR)$(INCLUDEDIR)
+
 #
-# Rules for dtc proper
+# Rules for versioning
 #
-DTC_PROGS = dtc ftdump
-DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
-		srcpos.o treesource.o \
-		dtc-parser.tab.o lex.yy.o
-DTC_DEPFILES = $(DTC_OBJS:%.o=%.d)
 
-BIN += dtc ftdump
+DTC_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+VERSION_FILE = version_gen.h
 
-dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
-	@$(VECHO) BISON $@
-	@$(VECHO) ---- Expect 2 s/r and 2 r/r. ----
-	$(BISON) -d $<
+CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+	  else if [ -x /bin/bash ]; then echo /bin/bash; \
+	  else echo sh; fi ; fi)
+
+nullstring :=
+space	:= $(nullstring) # end of line
+
+localver_config = $(subst $(space),, $(string) \
+			      $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
+
+localver_cmd = $(subst $(space),, $(string) \
+			      $(patsubst "%",%,$(LOCALVERSION)))
+
+localver_scm = $(shell $(CONFIG_SHELL) ./scripts/setlocalversion)
+localver_full  = $(localver_config)$(localver_cmd)$(localver_scm)
+
+dtc_version = $(DTC_VERSION)$(localver_full)
+
+# Contents of the generated version file.
+define filechk_version
+	(echo "#define DTC_VERSION \"DTC $(dtc_version)\""; )
+endef
+
+define filechk
+	set -e;					\
+	echo '	CHK $@';			\
+	mkdir -p $(dir $@);			\
+	$(filechk_$(1)) < $< > $@.tmp;		\
+	if [ -r $@ ] && cmp -s $@ $@.tmp; then	\
+		rm -f $@.tmp;			\
+	else					\
+		echo '	UPD $@';		\
+		mv -f $@.tmp $@;		\
+	fi;
+endef
 
 $(VERSION_FILE): Makefile FORCE
 	$(call filechk,version)
 
-lex.yy.c: dtc-lexer.l
-	@$(VECHO) LEX $@
-	$(LEX) $<
+#
+# Rules for dtc proper
+#
+include Makefile.dtc
+
+BIN += dtc
+
+# This stops make from generating the lex and bison output during
+# auto-dependency computation, but throwing them away as an
+# intermediate target and building them again "for real"
+.SECONDARY: $(DTC_GEN_SRCS)
 
 dtc: $(DTC_OBJS)
 
+ifneq ($(DEPTARGETS),)
+-include $(DTC_OBJS:%.o=%.d)
+endif
+#
+# Rules for ftdump
+#
+BIN += ftdump
+
 ftdump:	ftdump.o
 
 ifneq ($(DEPTARGETS),)
--include $(DTC_DEPFILES)
+-include ftdump.d
 endif
-
 #
 # Rules for libfdt
 #
-LIBFDT_PREFIX = libfdt/
+LIBFDT_objdir = libfdt
+LIBFDT_srcdir = libfdt
 include libfdt/Makefile.libfdt
 
 .PHONY: libfdt
 libfdt: $(LIBFDT_LIB)
 
+$(LIBFDT_LIB): $(addprefix libfdt/,$(LIBFDT_OBJS))
+
 libfdt_clean:
 	@$(VECHO) CLEAN "(libfdt)"
-	rm -f $(LIBFDT_CLEANFILES)
+	rm -f $(addprefix libfdt/,$(STD_CLEANFILES))
+	rm -f $(addprefix libfdt/,$(LIBFDT_CLEANFILES))
 
 ifneq ($(DEPTARGETS),)
--include $(LIBFDT_DEPFILES)
+-include $(LIBFDT_OBJS:%.o=%.d)
 endif
 
 #
@@ -131,38 +158,18 @@ endif
 TESTS_PREFIX=tests/
 include tests/Makefile.tests
 
-STD_CLEANFILES = *~ *.o *.d *.a *.i *.s core a.out
-GEN_CLEANFILES = $(VERSION_FILE)
+#
+# Clean rules
+#
+STD_CLEANFILES = *~ *.o *.d *.a *.i *.s core a.out vgcore.* \
+	*.tab.[ch] *.lex.c *.output
 
 clean: libfdt_clean tests_clean
 	@$(VECHO) CLEAN
-	rm -f $(STD_CLEANFILES)
-	rm -f $(GEN_CLEANFILES)
-	rm -f *.tab.[ch] lex.yy.c *.output vgcore.*
+	rm -f $(STD_CLEANFILES) $(DTC_CLEANFILES)
+	rm -f $(VERSION_FILE)
 	rm -f $(BIN)
 
-install: all
-	@$(VECHO) INSTALL
-	$(INSTALL) -d $(DESTDIR)$(BINDIR)
-	$(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
-	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
-	$(INSTALL) -m 644 $(LIBFDT_LIB) $(DESTDIR)$(LIBDIR)
-	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL) -m 644 $(LIBFDT_INCLUDES) $(DESTDIR)$(INCLUDEDIR)
-
-define filechk
-	set -e;					\
-	echo '	CHK $@';			\
-	mkdir -p $(dir $@);			\
-	$(filechk_$(1)) < $< > $@.tmp;		\
-	if [ -r $@ ] && cmp -s $@ $@.tmp; then	\
-		rm -f $@.tmp;			\
-	else					\
-		echo '	UPD $@';		\
-		mv -f $@.tmp $@;		\
-	fi;
-endef
-
 #
 # Generic compile rules
 #
@@ -193,4 +200,12 @@ endef
 	@$(VECHO) AR $@
 	$(AR) $(ARFLAGS) $@ $^
 
+%.lex.c: %.l
+	@$(VECHO) LEX $@
+	$(LEX) -o $@ $<
+
+%.tab.c %.tab.h %.output: %.y
+	@$(VECHO) BISON $@
+	$(BISON) -d $<
+
 FORCE:
Index: dtc/Makefile.dtc
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ dtc/Makefile.dtc	2007-09-27 14:21:17.000000000 +1000
@@ -0,0 +1,24 @@
+# Makefile.dtc
+#
+# This is not a complete Makefile of itself.  Instead, it is designed to
+# be easily embeddable into other systems of Makefiles.
+#
+DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c
+DTC_EXTRA = dtc.h srcpos.h
+DTC_LEXFILES = dtc-lexer.l
+DTC_BISONFILES = dtc-parser.y
+
+DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
+DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
+DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
+
+DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
+DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
+DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
+
+DTC_CLEANFILES = $(DTC_GEN_ALL)
+
+# We assume the containing Makefile system can do auto-dependencies for most
+# things, but we supply the dependencies on generated header files explicitly
+
+$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))
Index: dtc/libfdt/Makefile.libfdt
===================================================================
--- dtc.orig/libfdt/Makefile.libfdt	2007-09-27 14:08:05.000000000 +1000
+++ dtc/libfdt/Makefile.libfdt	2007-09-27 14:14:30.000000000 +1000
@@ -3,19 +3,12 @@
 # This is not a complete Makefile of itself.  Instead, it is designed to
 # be easily embeddable into other systems of Makefiles.
 #
-LIBFDT_OBJS_L = fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o
-LIBFDT_OBJS = $(LIBFDT_OBJS_L:%=$(LIBFDT_PREFIX)%)
+LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
+LIBFDT_INCLUDES = fdt.h libfdt.h
+LIBFDT_EXTRA = libfdt_internal.h
+LIBFDT_LIB = libfdt/libfdt.a
 
-LIBFDT_LIB_L = libfdt.a
-LIBFDT_LIB = $(LIBFDT_LIB_L:%=$(LIBFDT_PREFIX)%)
+LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
 
-LIBFDT_INCLUDES_L = fdt.h libfdt.h
-LIBFDT_INCLUDES = $(LIBFDT_INCLUDES_L:%=$(LIBFDT_PREFIX)%)
+$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
 
-LIBFDT_CLEANFILES_L = *~ *.o *.d *.a $(LIBFDT_LIB) \
-	*.i *.s a.out core
-LIBFDT_CLEANFILES = $(LIBFDT_CLEANFILES_L:%=$(LIBFDT_PREFIX)%)
-
-$(LIBFDT_LIB): $(LIBFDT_OBJS)
-
-LIBFDT_DEPFILES = $(LIBFDT_OBJS:%.o=%.d)

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Patches added to powerpc.git for-2.6.24 branch
From: Paul Mackerras @ 2007-10-03  6:27 UTC (permalink / raw)
  To: linuxppc-dev

Adrian Bunk (1):
      [POWERPC] Select proper defconfig for crosscompiles

Aristeu Rozanski (1):
      [POWERPC] adbhid: Enable KEY_FN key reporting

Arnd Bergmann (3):
      [POWERPC] add Kconfig option for optimizing for cell
      [POWERPC] Move embedded6xx into multiplatform
      [POWERPC] Fix pci domain detection

Benjamin Herrenschmidt (1):
      [POWERPC] Fix platinumfb framebuffer

Cyrill Gorcunov (6):
      [POWERPC] Sky Cpu and Nexus: code style improvement
      [POWERPC] Sky Cpu and Nexus: include io.h
      [POWERPC] Sky Cpu and Nexus: check for platform_get_resource retcode
      [POWERPC] Sky Cpu and Nexus: check for create_proc_entry ret code
      [POWERPC] Sky Cpu: use C99 style for struct init
      [POWERPC] Sky Cpu and Nexus: use seq_file/single_open on proc interface

Dale Farnsworth (1):
      [POWERPC] Add Marvell mv64x60 udbg putc/getc functions

David Woodhouse (1):
      [POWERPC] Optionally use new device number for pmac_zilog

Domen Puncer (1):
      [POWERPC] clk.h interface for platforms

Ed Swarthout (1):
      [POWERPC] Add memory regions to the kcore list for 32-bit machines

Emil Medve (1):
      [POWERPC] Fix build errors when BLOCK=n

Grant Likely (2):
      [POWERPC] mpc8349: Add linux,network-index to ethernet nodes in device tree
      [POWERPC] mpc5200: Add cuimage support for mpc5200 boards

Hugh Dickins (1):
      [POWERPC] ppc64: support CONFIG_DEBUG_PREEMPT

Ishizaki Kou (5):
      [POWERPC] Celleb: Move pause, kexec_cpu_down to beat.c
      [POWERPC] Celleb: Support for Power/Reset buttons
      [POWERPC] Celleb: New HTAB Guest OS Interface on Beat
      [POWERPC] Celleb: Serial I/O update
      [POWERPC] Celleb: update for PCI

Jeremy Kerr (1):
      [POWERPC] cell: Don't cast the result of of_get_property()

Joachim Fenkes (1):
      [POWERPC] ibmebus: More descriptive error return code in ibmebus_store_probe()

Jochen Friedrich (4):
      [POWERPC] Fix copy'n'paste typo in commproc.c
      [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
      [PPC] Compile fix for 8xx CPM Ehernet driver
      [POWERPC] Fix cpm_uart driver

Linas Vepstas (2):
      [POWERPC] pseries: device node status can be "ok" or "okay"
      [POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller

Mark A. Greer (1):
      [POWERPC] MAINTAINERS shouldn't reference linuxppc-embedded

Mathieu Desnoyers (1):
      [POWERPC] Include pagemap.h in asm/powerpc/tlb.h

Meelis Roos (1):
      [POWERPC] Fix ppc kernels after build-id addition

Michael Ellerman (8):
      [POWERPC] Make sure to of_node_get() the result of pci_device_to_OF_node()
      [POWERPC] Simplify error logic in u3msi_setup_msi_irqs()
      [POWERPC] Simplify error logic in rtas_setup_msi_irqs()
      [POWERPC] Simplify rtas_change_msi() error semantics
      [POWERPC] Inline u3msi_compose_msi_msg()
      [POWERPC] Store the base address in dcr_host_t
      [POWERPC] Update mpic to use dcr_host_t.base
      [POWERPC] Update axon_msi to use dcr_host_t.base

Mike Frysinger (1):
      [POWERPC] Use __attribute__ in asm-powerpc

Milton Miller (2):
      [POWERPC] boot: Record header bytes in gunzip_start
      [POWERPC] boot: Simplify gunzip_finish

Olof Johansson (2):
      [POWERPC] Support setting affinity for U3/U4 MSI sources
      [POWERPC] Separate out legacy machine check exception parsers

Paul Mackerras (1):
      [POWERPC] Disable power management for arch/ppc

Robert P. J. Day (1):
      [POWERPC] Prevent direct inclusion of <asm/rwsem.h>.

Roland McGrath (2):
      [POWERPC] Add CHECK_FULL_REGS in several places in ptrace code
      [POWERPC] powerpc vDSO: install unstripped copies on disk

Satyam Sharma (1):
      [POWERPC] Avoid pointless WARN_ON(irqs_disabled()) from panic codepath

Scott Wood (3):
      [POWERPC] bootwrapper: Factor out dt_set_mac_address()
      [POWERPC] bootwrapper: Add PlanetCore firmware support
      [POWERPC] Make instruction dumping work in real mode

Stephen Rothwell (5):
      [POWERPC] Create and use CONFIG_WORD_SIZE
      [POWERPC] Remove debug printk from vio_bus_init
      [POWERPC] Simplify vio_bus_init a little for legacy iSeries
      [POWERPC] Make vio_bus_type static
      [POWERPC] Limit range of __init_ref_ok somewhat

Tony Breeds (6):
      [POWERPC] Convert define_machine(mpc885_ads) to C99 initializer syntax
      [POWERPC] Implement {read,update}_persistent_clock
      [POWERPC] Implement generic time of day clocksource for powerpc
      [POWERPC] Fix panic in RTAS code
      [POWERPC] Implement clockevents driver for powerpc
      [POWERPC] Enable tickless idle and high res timers for powerpc

^ permalink raw reply

* Re: Patches added to powerpc.git for-2.6.24 branch
From: Stephen Rothwell @ 2007-10-03  7:15 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18179.13902.936820.573996@cargo.ozlabs.ibm.com>

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

On Wed, 3 Oct 2007 16:27:26 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> Stephen Rothwell (5):
>       [POWERPC] Create and use CONFIG_WORD_SIZE
>       [POWERPC] Remove debug printk from vio_bus_init
>       [POWERPC] Simplify vio_bus_init a little for legacy iSeries
>       [POWERPC] Make vio_bus_type static
>       [POWERPC] Limit range of __init_ref_ok somewhat

Would you also consider:

[POWERPC] Prepare to remove of_platform_driver name
(http://patchwork.ozlabs.org/linuxppc/patch?id=13667)

-- 
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: Problem with OF interrupt parsing code
From: Gerhard Pircher @ 2007-10-03  7:43 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1191362607.22572.26.camel@pasglop>


-------- Original-Nachricht --------
> Datum: Wed, 03 Oct 2007 08:03:27 +1000
> Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> CC: linuxppc-dev@ozlabs.org
> Betreff: Re: Problem with OF interrupt parsing code

> 
> On Tue, 2007-10-02 at 14:38 +0200, Gerhard Pircher wrote:
> > I know that it's ugly, but the problem is how to distinguish the
> > boards. The only real difference I know of is the PCI interrupt
> > mapping. The northbridges chip revision for example is always the
> > same, but CPU type, amount of memory and PCI devices can appear in
> > all possible combinations. The firmware doesn't tell me, which board
> > the kernel is runnning on, so I would like to rely on this fall back
> > here until I get the chance to update the firmware (which is beyond
> > my control).
> 
> And how does the firmware know ? There must be a strap somewhere...
> 
> Ben.
Good question. I don't know. Anyway I changed the device tree based on
your comments and now it works (at least until the kernel deadlocks
somewhere else). :(

Gerhard

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

^ permalink raw reply

* Re: Patches added to powerpc.git for-2.6.24 branch
From: Stephen Rothwell @ 2007-10-03  8:12 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071003171551.7184d83b.sfr@canb.auug.org.au>

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

On Wed, 3 Oct 2007 17:15:51 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Would you also consider:
> 
> [POWERPC] Prepare to remove of_platform_driver name
> (http://patchwork.ozlabs.org/linuxppc/patch?id=13667)

Also:

[PATCH 07/11] [POWERPC] iSeries: missing newline in printk
(http://patchwork.ozlabs.org/linuxppc/patch?id=13661)
and
[PATCH 10/11] [POWERPC] Clean up vio.h
(http://patchwork.ozlabs.org/linuxppc/patch?id=13664)

don't actually interact with the rest of the series.

I rebuilt {ppc64,pseries,iseries}_defconfig with just the above three
patches on top of the current for-2.6.24 tree to be sure.

-- 
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: pata_mpc52xx - no interrupts when using bestcomm/dma?
From: Matt Sealey @ 2007-10-03 11:25 UTC (permalink / raw)
  To: Domen Puncer; +Cc: linuxppc-embedded
In-Reply-To: <20070827094454.GQ13994@moe.telargo.com>

Hi guys,

I'm not sure if this is a particularly PowerPC problem - more ATA -
but I am curious if we just got rid of the MWDMA and UDMA stuff from
this patch, would it still work in a sort of PIO mode with the
BestComm task being invoked at the right times?

All BestComm needs to do is marshall the data back and forth, since
the ATA portion is covered by errata and 'hidden' bugs you can't rely
on FIFO errors or the automatic handling anyway..

On that note, seeing as it seems to be easily possible to invoke
a BestComm task on something other than a FIFO (just needs two
physical address pointers), does anyone feel motivated to try and
make some kind of memory copy handler/task which can be invoked
in the case of some memory activity required? Or, perhaps, work
out the PCI DMA TX/RX stuff and what it could be used for (I
personally don't understand how PCI DMA isn't handled by the
PCI arbiter anyway.. doesn't this mean no PCI DMA is ever done on
MPC5200 platforms right now??)

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

Domen Puncer wrote:
> Hi!
> 
> I'm taking a stab at adding DMA support to pata_mpc52xx driver.
> 
> It's based on patches from Freescale's ltib (old ide driver).
> 
> 
> The problem is that I can't seem to get any interrupts
> (not ata, not bestcomm task), when setting up MWDMA/UDMA mode.
> 
> Ideas?
> 
> 
> My current patch:
> 
> ---
>  drivers/ata/pata_mpc52xx.c |  491 +++++++++++++++++++++++++++++++++++++++++++--
>  include/linux/libata.h     |    2 
>  2 files changed, 477 insertions(+), 16 deletions(-)
> 
> Index: work-powerpc.git/drivers/ata/pata_mpc52xx.c
> ===================================================================
> --- work-powerpc.git.orig/drivers/ata/pata_mpc52xx.c
> +++ work-powerpc.git/drivers/ata/pata_mpc52xx.c
> @@ -4,6 +4,7 @@
>   * libata driver for the Freescale MPC52xx on-chip IDE interface
>   *
>   * Copyright (C) 2006 Sylvain Munaut <tnt@246tNt.com>
> + * Copyright (C) 2005,2006 Freescale - Bernard Kuhn, John Rigby
>   * Copyright (C) 2003 Mipsys - Benjamin Herrenschmidt
>   *
>   * This file is licensed under the terms of the GNU General Public License
> @@ -22,6 +23,8 @@
>  #include <asm/of_platform.h>
>  #include <asm/mpc52xx.h>
>  
> +#include <sysdev/bestcomm/bestcomm.h>
> +#include <sysdev/bestcomm/ata.h>
>  
>  #define DRV_NAME	"mpc52xx_ata"
>  #define DRV_VERSION	"0.1.0ac2"
> @@ -31,6 +34,14 @@
>  struct mpc52xx_ata_timings {
>  	u32	pio1;
>  	u32	pio2;
> +	u32	mdma1;
> +	u32	mdma2;
> +	u32	udma1;
> +	u32	udma2;
> +	u32	udma3;
> +	u32	udma4;
> +	u32	udma5;
> +	int	using_udma;
>  };
>  
>  struct mpc52xx_ata_priv {
> @@ -39,6 +50,12 @@ struct mpc52xx_ata_priv {
>  	int				ata_irq;
>  	struct mpc52xx_ata_timings	timings[2];
>  	int				csel;
> +
> +	/* dma stuff follows */
> +	struct bcom_task *		dmatsk;
> +	const struct udmaspec *		udmaspec;
> +	const struct mdmaspec *		mdmaspec;
> +	int 				mpc52xx_ata_dma_last_write;
>  };
>  
>  
> @@ -53,6 +70,102 @@ static const int ataspec_ta[5]    = { 35
>  
>  #define CALC_CLKCYC(c,v) ((((v)+(c)-1)/(c)))
>  
> +/* ATAPI-4 MDMA specs (in clocks) */
> +struct mdmaspec {
> +	u32 t0M[3];
> +	u32 td[3];
> +	u32 th[3];
> +	u32 tj[3];
> +	u32 tkw[3];
> +	u32 tm[3];
> +	u32 tn[3];
> +};
> +
> +// -----------------------------------------------------------------------------------------------
> +
> +static const struct mdmaspec mdmaspec66 = {
> +	{32,  10,  8},
> +	{15,  6,   5},
> +	{2,   1,   1},
> +	{2,   1,   1},
> +	{15,  4,   2},
> +	{4,   2,   2},
> +	{1,   1,   1}
> +};
> +
> +static const struct mdmaspec mdmaspec132 = {
> +	{64,  20,  16},
> +	{29,  11,  10},
> +	{3,   2,   2},
> +	{3,   1,   1},
> +	{29,  7,   4},
> +	{7,   4,   4},
> +	{2,   1,   1}
> +};
> +
> +
> +/* ATAPI-4 UDMA specs (in clocks) */
> +struct udmaspec {
> +	u32 tcyc[6];
> +	u32 t2cyc[6];
> +	u32 tds[6];
> +	u32 tdh[6];
> +	u32 tdvs[6];
> +	u32 tdvh[6];
> +	u32 tfs_min[6];
> +	u32 tli_max[6];
> +	u32 tmli[6];
> +	u32 taz[6];
> +	u32 tzah[6];
> +	u32 tenv_min[6];
> +	u32 tsr[6];
> +	u32 trfs[6];
> +	u32 trp[6];
> +	u32 tack[6];
> +	u32 tss[6];
> +};
> +
> +static const struct udmaspec udmaspec66 = {
> +	{ 8,  5,  4,  3,  2,  2},
> +	{16, 11,  8,  6,  4 , 2},
> +	{ 1,  1,  1,  1,  1,  1},
> +	{ 1,  1,  1,  1,  1,  1},
> +	{ 5,  4,  3,  2,  1,  1},
> +	{ 1,  1,  1,  1,  1,  1},
> +	{16, 14, 12,  9,  8,  6},
> +	{10, 10, 10,  7,  8,  5},
> +	{ 2,  2,  2,  2,  2,  2},
> +	{ 1,  1,  1,  1,  1,  1},
> +	{ 2,  2,  2,  2,  2,  2},
> +	{ 2,  2,  2,  2,  2,  2},
> +	{ 3,  2,  2,  2,  2,  2},
> +	{ 5,  5,  4,  4,  4,  4},
> +	{11,  9,  7,  7,  7,  6},
> +	{ 2,  2,  2,  2,  2,  2},
> +	{ 4,  4,  4,  4,  4,  4}
> +};
> +
> +static const struct udmaspec udmaspec132 = {
> +	{15, 10,  6,  7,  2,  3},
> +	{31, 21, 12, 12,  5,  6},
> +	{ 2,  2,  1,  1,  0,  1},
> +	{ 1,  1,  1,  1,  0,  1},
> +	{10,  7,  5,  3,  1,  1},
> +	{ 1,  1,  1,  1,  1,  1},
> +	{30, 27, 23, 15, 16, 12},
> +	{20, 20, 20, 13, 14, 10},
> +	{ 3,  3,  3,  3,  2,  3},
> +	{ 2,  2,  2,  2,  1,  2},
> +	{ 3,  3,  3,  3,  2,  3},
> +	{ 3,  3,  3,  3,  2,  3},
> +	{ 7,  4,  3,  3,  2,  3},
> +	{10, 10,  8,  8,  7,  7},
> +	{22, 17, 14, 14, 13, 12},
> +	{ 3,  3,  3,  3,  2,  3},
> +	{ 7,  7,  7,  7,  6,  7},
> +};
> +
> +// -----------------------------------------------------------------------------------------------
>  
>  /* Bit definitions inside the registers */
>  #define MPC52xx_ATA_HOSTCONF_SMR	0x80000000UL /* State machine reset */
> @@ -76,6 +189,10 @@ static const int ataspec_ta[5]    = { 35
>  #define MPC52xx_ATA_DMAMODE_HUT		0x40 /* Host UDMA burst terminate */
>  
>  
> +#define MAX_DMA_BUFFERS 128
> +#define MAX_DMA_BUFFER_SIZE 0x20000u
> +
> +
>  /* Structure of the hardware registers */
>  struct mpc52xx_ata {
>  
> @@ -141,6 +258,19 @@ struct mpc52xx_ata {
>  
>  /* MPC52xx low level hw control */
>  
> +static inline void
> +mpc52xx_ata_wait_tip_bit_clear(struct mpc52xx_ata __iomem *regs)
> +{
> +	int timeout = 1000;
> +
> +	while (in_be32(&regs->host_status) & MPC52xx_ATA_HOSTSTAT_TIP)
> +		if (timeout-- == 0) {
> +			printk(KERN_ERR "mpc52xx-ide: Timeout waiting for TIP clear\n");
> +			break;
> +		}
> +	udelay(10);     /* FIXME: Necessary ??? */
> +}
> +
>  static int
>  mpc52xx_ata_compute_pio_timings(struct mpc52xx_ata_priv *priv, int dev, int pio)
>  {
> @@ -165,6 +295,96 @@ mpc52xx_ata_compute_pio_timings(struct m
>  	return 0;
>  }
>  
> +static int
> +mpc52xx_ata_compute_mdma_timings(struct mpc52xx_ata_priv *priv, int dev, int speed)
> +{
> +	struct mpc52xx_ata_timings *timing = &priv->timings[dev];
> +	u32 t0M, td, tkw, tm, th, tj, tn;
> +
> +	if (speed < 0 || speed > 2)
> +		return -EINVAL;
> +
> +	t0M = priv->mdmaspec->t0M[speed];
> +	td = priv->mdmaspec->td[speed];
> +	tkw = priv->mdmaspec->tkw[speed];
> +	tm = priv->mdmaspec->tm[speed];
> +	th = priv->mdmaspec->th[speed];
> +	tj = priv->mdmaspec->tj[speed];
> +	tn = priv->mdmaspec->tn[speed];
> +
> +	/*
> +	DPRINTK ("t0M = %d\n", t0M);
> +	DPRINTK ("td  = %d\n", td);
> +	DPRINTK ("tkw = %d\n", tkw);
> +	DPRINTK ("tm  = %d\n", tm);
> +	DPRINTK ("th  = %d\n", th);
> +	DPRINTK ("tj  = %d\n", tj);
> +	DPRINTK ("tn  = %d\n", tn);
> +	*/
> +	timing->mdma1 = (t0M << 24) | (td << 16) | (tkw << 8) | (tm);
> +	timing->mdma2 = (th << 24) | (tj << 16) | (tn << 8);
> +
> +	timing->using_udma = 0;
> +
> +	return 0;
> +}
> +
> +static int
> +mpc52xx_ata_compute_udma_timings(struct mpc52xx_ata_priv *priv, int dev, int speed)
> +{
> +	struct mpc52xx_ata_timings *timing = &priv->timings[dev];
> +	u32 t2cyc, tcyc, tds, tdh, tdvs, tdvh, tfs, tli, tmli, taz, tenv, tsr, tss, trfs, trp, tack, tzah;
> +
> +	if (speed < 0 || speed > 2)
> +		return -EINVAL;
> +
> +	t2cyc = priv->udmaspec->t2cyc[speed];
> +	tcyc = priv->udmaspec->tcyc[speed];
> +	tds = priv->udmaspec->tds[speed];
> +	tdh = priv->udmaspec->tdh[speed];
> +	tdvs = priv->udmaspec->tdvs[speed];
> +	tdvh = priv->udmaspec->tdvh[speed];
> +	tfs = priv->udmaspec->tfs_min[speed];
> +	tmli = priv->udmaspec->tmli[speed];
> +	tenv = priv->udmaspec->tenv_min[speed];
> +	tss = priv->udmaspec->tss[speed];
> +	trp = priv->udmaspec->trp[speed];
> +	tack = priv->udmaspec->tack[speed];
> +	tzah = priv->udmaspec->tzah[speed];
> +	taz = priv->udmaspec->taz[speed];
> +	trfs = priv->udmaspec->trfs[speed];
> +	tsr = priv->udmaspec->tsr[speed];
> +	tli = priv->udmaspec->tli_max[speed];
> +/*
> +	DPRINTK ("UDMA t2cyc = %d\n", t2cyc);
> +	DPRINTK ("UDMA tcyc  = %d\n", tcyc);
> +	DPRINTK ("UDMA tds   = %d\n", tds);
> +	DPRINTK ("UDMA tdh   = %d\n", tdh);
> +	DPRINTK ("UDMA tdvs  = %d\n", tdvs);
> +	DPRINTK ("UDMA tdvh  = %d\n", tdvh);
> +	DPRINTK ("UDMA tfs   = %d\n", tfs);
> +	DPRINTK ("UDMA tli   = %d\n", tli);
> +	DPRINTK ("UDMA tmli  = %d\n", tmli);
> +	DPRINTK ("UDMA taz   = %d\n", taz);
> +	DPRINTK ("UDMA tenv  = %d\n", tenv);
> +	DPRINTK ("UDMA tsr   = %d\n", tsr);
> +	DPRINTK ("UDMA tss   = %d\n", tss);
> +	DPRINTK ("UDMA trfs  = %d\n", trfs);
> +	DPRINTK ("UDMA trp   = %d\n", trp);
> +	DPRINTK ("UDMA tack  = %d\n", tack);
> +	DPRINTK ("UDMA tzah  = %d\n", tzah);
> +*/
> +	timing->udma1 = (t2cyc << 24) | (tcyc << 16) | (tds << 8) | (tdh);
> +	timing->udma2 = (tdvs << 24) | (tdvh << 16) | (tfs << 8) | (tli);
> +	timing->udma3 = (tmli << 24) | (taz << 16) | (tenv << 8) | (tsr);
> +	timing->udma4 = (tss << 24) | (trfs << 16) | (trp << 8) | (tack);
> +	timing->udma5 = (tzah << 24);
> +
> +	timing->using_udma = 1;
> +
> +	return 0;
> +}
> +
>  static void
>  mpc52xx_ata_apply_timings(struct mpc52xx_ata_priv *priv, int device)
>  {
> @@ -173,13 +393,13 @@ mpc52xx_ata_apply_timings(struct mpc52xx
>  
>  	out_be32(&regs->pio1,  timing->pio1);
>  	out_be32(&regs->pio2,  timing->pio2);
> -	out_be32(&regs->mdma1, 0);
> -	out_be32(&regs->mdma2, 0);
> -	out_be32(&regs->udma1, 0);
> -	out_be32(&regs->udma2, 0);
> -	out_be32(&regs->udma3, 0);
> -	out_be32(&regs->udma4, 0);
> -	out_be32(&regs->udma5, 0);
> +	out_be32(&regs->mdma1, timing->mdma1);
> +	out_be32(&regs->mdma2, timing->mdma2);
> +	out_be32(&regs->udma1, timing->udma1);
> +	out_be32(&regs->udma2, timing->udma2);
> +	out_be32(&regs->udma3, timing->udma3);
> +	out_be32(&regs->udma4, timing->udma4);
> +	out_be32(&regs->udma5, timing->udma5);
>  
>  	priv->csel = device;
>  }
> @@ -234,6 +454,7 @@ mpc52xx_ata_set_piomode(struct ata_port 
>  
>  	pio = adev->pio_mode - XFER_PIO_0;
>  
> +	// FIXME, can be called for dma mode?
>  	rv = mpc52xx_ata_compute_pio_timings(priv, adev->devno, pio);
>  
>  	if (rv) {
> @@ -245,6 +466,28 @@ mpc52xx_ata_set_piomode(struct ata_port 
>  	mpc52xx_ata_apply_timings(priv, adev->devno);
>  }
>  static void
> +mpc52xx_ata_set_dmamode(struct ata_port *ap, struct ata_device *adev)
> +{
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +	int rv;
> +
> +	if (adev->dma_mode >= XFER_UDMA_0) {
> +		int dma = adev->dma_mode - XFER_UDMA_0;
> +		rv = mpc52xx_ata_compute_udma_timings(priv, adev->devno, dma);
> +	} else {
> +		int dma = adev->dma_mode - XFER_MW_DMA_0;
> +		rv = mpc52xx_ata_compute_mdma_timings(priv, adev->devno, dma);
> +	}
> +
> +	if (rv) {
> +		printk(KERN_ERR DRV_NAME
> +			": Trying to select invalid DMA mode %d\n", adev->dma_mode);
> +		return;
> +	}
> +
> +	mpc52xx_ata_apply_timings(priv, adev->devno);
> +}
> +static void
>  mpc52xx_ata_dev_select(struct ata_port *ap, unsigned int device)
>  {
>  	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> @@ -258,10 +501,174 @@ mpc52xx_ata_dev_select(struct ata_port *
>  static void
>  mpc52xx_ata_error_handler(struct ata_port *ap)
>  {
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +	struct mpc52xx_ata __iomem *regs = priv->ata_regs;
> +
> +	printk(KERN_ALERT "%s: status: %08x; fifo_status_frame: %08x; fifo_status: %08x\n",
> +			__func__, in_be32(&regs->host_status),
> +			in_be32(&regs->fifo_status_frame),
> +			in_be32(&regs->fifo_status));
> +
>  	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, NULL,
>  			ata_std_postreset);
>  }
>  
> +static void
> +mpc52xx_ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf)
> +{
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +
> +	mpc52xx_ata_wait_tip_bit_clear(priv->ata_regs);
> +
> +	ata_exec_command(ap, tf);
> +}
> +
> +static int
> +mpc52xx_ata_build_dmatable(struct ata_queued_cmd *qc)
> +{
> +	struct ata_port *ap = qc->ap;
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +	struct mpc52xx_ata __iomem *regs = priv->ata_regs;
> +	struct scatterlist *sg;
> +	unsigned int read = !(qc->tf.flags & ATA_TFLAG_WRITE);
> +	int count = 0;
> +
> +	if (read)
> +		bcom_ata_rx_prepare(priv->dmatsk);
> +	else
> +		bcom_ata_tx_prepare(priv->dmatsk);
> +
> +
> +	ata_for_each_sg(sg, qc) {
> +		u32 cur_addr = sg_dma_address(sg);
> +		u32 cur_len = sg_dma_len(sg);
> +
> +		while (cur_len) {
> +			unsigned int tc = min(cur_len, MAX_DMA_BUFFER_SIZE);
> +			struct bcom_ata_bd *bd;
> +
> +			bd = (struct bcom_ata_bd *)
> +				bcom_prepare_next_buffer(priv->dmatsk);
> +
> +			if (read) {
> +				bd->status = tc;
> +				bd->dst_pa = cur_addr;
> +				bd->src_pa = (__force u32)&regs->fifo_data; // virt_to_phys?
> +			} else {
> +				bd->status = tc;
> +				bd->dst_pa = (__force u32)&regs->fifo_data; // virt_to_phys?
> +				bd->src_pa = cur_addr;
> +
> +				/* and how does bestcomm know to increase one, and not other?
> +				 * XXX TODO */
> +			}
> +
> +			bcom_submit_next_buffer(priv->dmatsk, phys_to_virt(cur_addr)); // qc is just a cookie
> +
> +			cur_addr += tc;
> +			cur_len -= tc;
> +			count++;
> +
> +			if (count == MAX_DMA_BUFFERS) {
> +				printk(KERN_ALERT "%s: %i dma table too small\n",
> +						__func__, __LINE__);
> +				goto use_pio_instead;
> +			}
> +		}
> +	}
> +	return 1;
> +
> + use_pio_instead:
> +	bcom_ata_reset_bd(priv->dmatsk);
> +	//pci_unmap_sg ???
> +
> +	return 0;
> +}
> +
> +static void
> +mpc52xx_bmdma_setup(struct ata_queued_cmd *qc)
> +{
> +	struct ata_port *ap = qc->ap;
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +	struct mpc52xx_ata __iomem *regs = priv->ata_regs;
> +	unsigned int read = !(qc->tf.flags & ATA_TFLAG_WRITE);
> +	u8 dma_mode;
> +printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +
> +	if (!mpc52xx_ata_build_dmatable(qc)) {
> +		//ide_map_sg(drive, rq);
> +		printk(KERN_ALERT "%s: %i, return 1?\n", __func__, __LINE__);
> +	}
> +
> +	if (read) {
> +		dma_mode = MPC52xx_ATA_DMAMODE_IE | MPC52xx_ATA_DMAMODE_READ |
> +				MPC52xx_ATA_DMAMODE_FE;
> +
> +		/* Setup FIFO if direction changed */
> +		if (priv->mpc52xx_ata_dma_last_write) {
> +			priv->mpc52xx_ata_dma_last_write = 0;
> +			mpc52xx_ata_wait_tip_bit_clear(regs);
> +			out_8(&regs->dma_mode, MPC52xx_ATA_DMAMODE_FR);
> +			/* Configure it with granularity to 7 like sample code */
> +			out_8(&regs->fifo_control, 7);
> +			out_be16(&regs->fifo_alarm, 128);
> +		}
> +	} else {
> +		dma_mode = MPC52xx_ATA_DMAMODE_IE | MPC52xx_ATA_DMAMODE_WRITE;
> +
> +		/* Setup FIFO if direction changed */
> +		if (!priv->mpc52xx_ata_dma_last_write) {
> +			priv->mpc52xx_ata_dma_last_write = 1;
> +			mpc52xx_ata_wait_tip_bit_clear(regs);
> +			/* Configure FIFO with granularity to 4 like sample code */
> +			out_8(&regs->fifo_control, 4);
> +			//out_be16(&regs->fifo_alarm, 256);
> +			out_be16(&regs->fifo_alarm, 128);
> +		}
> +	}
> +
> +	if (priv->timings[qc->dev->devno].using_udma)
> +		dma_mode |= MPC52xx_ATA_DMAMODE_UDMA;
> +
> +	mpc52xx_ata_wait_tip_bit_clear(regs);
> +	out_8(&regs->dma_mode, dma_mode);
> +
> +	ap->ops->exec_command(ap, &qc->tf); // added, ata_bmdma_setup has it
> +}
> +
> +static void
> +mpc52xx_bmdma_start(struct ata_queued_cmd *qc)
> +{
> +	struct ata_port *ap = qc->ap;
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +
> +	//xlb_clear(); // WTF
> +	bcom_enable(priv->dmatsk);
> +}
> +
> +static void
> +mpc52xx_bmdma_stop(struct ata_queued_cmd *qc)
> +{
> +	// uh? looks like destructor for setup not start
> +	struct ata_port *ap = qc->ap;
> +	struct mpc52xx_ata_priv *priv = ap->host->private_data;
> +printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +
> +	bcom_disable(priv->dmatsk);
> +	//bcom_clear_irq(priv->dmatsk); //!!
> +	bcom_ata_reset_bd(priv->dmatsk);
> +
> +	//	mpc52xx_ata_destroy_dmatable();
> +}
> +// waiting_for_dma eliminated
> +
> +static u8
> +mpc52xx_bmdma_status(struct ata_port *ap)
> +{
> +printk(KERN_ALERT "%s: %i TODO\n", __func__, __LINE__);
> +	return 0;
> +}
>  
>  
>  static struct scsi_host_template mpc52xx_ata_sht = {
> @@ -282,25 +689,47 @@ static struct scsi_host_template mpc52xx
>  	.bios_param		= ata_std_bios_param,
>  };
>  
> +static void mpc52xx_ata_bmdma_freeze(struct ata_port *ap)
> +{
> +	printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +	ata_bmdma_freeze(ap);
> +}
> +static void mpc52xx_ata_bmdma_thaw(struct ata_port *ap)
> +{
> +	printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +	ata_bmdma_thaw(ap);
> +}
> +static void ata_dummy_noret(struct ata_port *ap)
> +{
> +printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +}
>  static struct ata_port_operations mpc52xx_ata_port_ops = {
>  	.port_disable		= ata_port_disable,
>  	.set_piomode		= mpc52xx_ata_set_piomode,
> +	.set_dmamode		= mpc52xx_ata_set_dmamode,
>  	.dev_select		= mpc52xx_ata_dev_select,
>  	.tf_load		= ata_tf_load,
>  	.tf_read		= ata_tf_read,
>  	.check_status		= ata_check_status,
> -	.exec_command		= ata_exec_command,
> -	.freeze			= ata_bmdma_freeze,
> -	.thaw			= ata_bmdma_thaw,
> +	.exec_command		= mpc52xx_ata_exec_command,
> +	.freeze			= mpc52xx_ata_bmdma_freeze,
> +	.thaw			= mpc52xx_ata_bmdma_thaw,
>  	.error_handler		= mpc52xx_ata_error_handler,
>  	.cable_detect		= ata_cable_40wire,
>  	.qc_prep		= ata_qc_prep,
>  	.qc_issue		= ata_qc_issue_prot,
>  	.data_xfer		= ata_data_xfer,
> -	.irq_clear		= ata_bmdma_irq_clear,
> +//	.irq_clear		= ata_bmdma_irq_clear,
> +	.irq_clear		= ata_dummy_noret,
>  	.irq_on			= ata_irq_on,
>  	.irq_ack		= ata_irq_ack,
>  	.port_start		= ata_port_start,
> +	.bmdma_setup		= mpc52xx_bmdma_setup,
> +	.bmdma_start		= mpc52xx_bmdma_start,
> +	.bmdma_stop		= mpc52xx_bmdma_stop,
> +	.bmdma_status		= mpc52xx_bmdma_status,
> +
> +// not ide_dma_check	int  (*check_atapi_dma) (struct ata_queued_cmd *qc);
>  };
>  
>  static int __devinit
> @@ -309,7 +738,6 @@ mpc52xx_ata_init_one(struct device *dev,
>  	struct ata_host *host;
>  	struct ata_port *ap;
>  	struct ata_ioports *aio;
> -	int rc;
>  
>  	host = ata_host_alloc(dev, 1);
>  	if (!host)
> @@ -317,9 +745,9 @@ mpc52xx_ata_init_one(struct device *dev,
>  
>  	ap = host->ports[0];
>  	ap->flags		|= ATA_FLAG_SLAVE_POSS;
> -	ap->pio_mask		= 0x1f;	/* Up to PIO4 */
> -	ap->mwdma_mask		= 0x00;	/* No MWDMA   */
> -	ap->udma_mask		= 0x00;	/* No UDMA    */
> +	ap->pio_mask		= ATA_PIO4;	/* Up to PIO4 */
> +	ap->mwdma_mask		= 0x07;		/* Up to MWDMA2 */
> +	ap->udma_mask		= ATA_UDMA2;	/* Up to UDMA2 */
>  	ap->ops			= &mpc52xx_ata_port_ops;
>  	host->private_data	= priv;
>  
> @@ -359,6 +787,15 @@ mpc52xx_ata_remove_one(struct device *de
>  /* OF Platform driver                                                       */
>  /* ======================================================================== */
>  
> +static irqreturn_t
> +mpc52xx_ata_task_irq(int irq, void *vpriv)
> +{
> +	struct mpc52xx_ata_priv *priv = vpriv;
> +printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +
> +	return IRQ_HANDLED;
> +}
> +
>  static int __devinit
>  mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
>  {
> @@ -426,6 +863,30 @@ mpc52xx_ata_probe(struct of_device *op, 
>  	priv->ata_irq = ata_irq;
>  	priv->csel = -1;
>  
> +	if (ipb_freq/1000000 == 66) {
> +		priv->mdmaspec = &mdmaspec66;
> +		priv->udmaspec = &udmaspec66;
> +	} else {
> +		priv->mdmaspec = &mdmaspec132;
> +		priv->udmaspec = &udmaspec132;
> +	}
> +
> +	priv->dmatsk = bcom_ata_init(MAX_DMA_BUFFERS, MAX_DMA_BUFFER_SIZE);
> +	if (!priv->dmatsk) {
> +		printk(KERN_ALERT "%s: %i\n", __func__, __LINE__);
> +		rv = -ENOMEM;
> +		goto err;
> +	}
> +	// XXX task irq? nope, it doesn't get any irq's
> +	{
> +		int ret;
> +		int task_irq = bcom_get_task_irq(priv->dmatsk);
> +		printk(KERN_ALERT "%s: ata task irq: %i\n", __func__, task_irq);
> +		ret = request_irq(task_irq, &mpc52xx_ata_task_irq, IRQF_DISABLED, "ata task", priv);
> +		if (ret)
> +			printk(KERN_ALERT "%s: request_irq failed with: %i\n", __func__, ret);
> +	}
> +
>  	/* Init the hw */
>  	rv = mpc52xx_ata_hw_init(priv);
>  	if (rv) {
> Index: work-powerpc.git/include/linux/libata.h
> ===================================================================
> --- work-powerpc.git.orig/include/linux/libata.h
> +++ work-powerpc.git/include/linux/libata.h
> @@ -51,7 +51,7 @@
>   * compile-time options: to be removed as soon as all the drivers are
>   * converted to the new debugging mechanism
>   */
> -#undef ATA_DEBUG		/* debugging output */
> +#define ATA_DEBUG		/* debugging output */
>  #undef ATA_VERBOSE_DEBUG	/* yet more debugging output */
>  #undef ATA_IRQ_TRAP		/* define to ack screaming irqs */
>  #undef ATA_NDEBUG		/* define to disable quick runtime checks */
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Anton Vorontsov @ 2007-10-03 13:30 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <11903212461510-git-send-email-timur@freescale.com>

Hi Timur,

On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote:
> This patch makes numerous miscellaneous code improvements to the QE library.

...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config stuff.

Commit 589ffa1c520355e37d5868 in galak/powerpc.git.

Unfortunately it isn't split, thus it will take time to track faulty bit.
But so far... maybe you have any ideas?

...
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 42) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: module loaded
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:e0:0c:00:00:fd
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 00:e0:0c:00:01:fd
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
UCC Ethernet Controller MII Bus: probed
ucc_geth: QE UCC Gigabit Ethernet Controller
ucc_geth: UCC1 at 0xe0082000 (irq = 32)
ucc_geth: UCC2 at 0xe0083000 (irq = 33)
PCI: Enabling device 0001:02:00.0 (0000 -> 0003)
sky2 0001:02:00.0: v1.18 addr 0xa0000000 irq 18 Yukon-EC (0xb6) rev 1
sky2 eth4: addr 00:00:5a:71:75:fe
Marvell 88E1101: Registered new driver
Marvell 88E1112: Registered new driver
Marvell 88E1111: Registered new driver
Marvell 88E1145: Registered new driver
netconsole: not configured, aborting
i2c /dev entries driver
rtc-ds1374 0-0068: rtc core: registered rtc-ds1374 as rtc0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-ds1374 0-0068: setting the system clock to 2007-01-02 22:23:42 (1167776622)
sky2 eth4: enabling interface
Sending DHCP requests .<6>PHY: e0024520:02 - Link is Up - 100/Full
PHY: e0024520:03 - Link is Up - 100/Full
PHY: e0024520:01 - Link is Up - 100/Full
., OK
IP-Config: Got DHCP answer from 10.0.0.2, my address is 10.0.0.99

Thanks,

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

^ permalink raw reply

* Re: Patches added to powerpc.git for-2.6.24 branch
From: Kumar Gala @ 2007-10-03 13:41 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18179.13902.936820.573996@cargo.ozlabs.ibm.com>

> Jochen Friedrich (4):
>       [POWERPC] Fix copy'n'paste typo in commproc.c
>       [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
>       [PPC] Compile fix for 8xx CPM Ehernet driver
>       [POWERPC] Fix cpm_uart driver
>
Some of these should already be Linus's tree (all but the 8xx CPM  
Ehernet)

- k

^ permalink raw reply

* Re: Please pull from 'for-2.6.24' branch of 4xx tree
From: Josh Boyer @ 2007-10-03 13:42 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20071002075420.0182bb7c@weaponx.rchland.ibm.com>

On Tue, 2 Oct 2007 07:54:20 -0500
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:

> Hi Paul,
> 
> Please pull from
> 
>  master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git for-2.6.24
> 
> to pick up a handful of new items for 2.6.24.  Initial Virtex support
> from Grant, some cpu setup functions for 4xx from Valentine, a compile
> fix for the Walnut wrapper, and a small number of arch/ppc fixes for
> Xilinx boards.

I've rebased my branch on top of your latest tree and added the
following two additional commits:

Grant Likely (2):
      [POWERPC] Uartlite: Add macros for register names
      [POWERPC] Uartlite: Revert register io access changes

Please pull

thx,
josh

^ permalink raw reply

* [PATCH] mtd: remove unnecessary memset from physmap_of driver
From: Valentine Barshak @ 2007-10-03 14:05 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-mtd
In-Reply-To: <18178.55231.813138.369480@cargo.ozlabs.ibm.com>

No need for memset to zero memory here, since we use kzalloc.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
 drivers/mtd/maps/physmap_of.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index cf75a56..aeed9ea 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -232,7 +232,6 @@ static int __devinit of_flash_probe(struct of_device *dev,
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
 	if (!info)
 		goto err_out;
-	memset(info, 0, sizeof(*info));
 
 	dev_set_drvdata(&dev->dev, info);
 
-- 
1.5.2.4

^ permalink raw reply related

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Timur Tabi @ 2007-10-03 14:16 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071003133032.GA2417@localhost.localdomain>

Anton Vorontsov wrote:
> Hi Timur,
> 
> On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote:
>> This patch makes numerous miscellaneous code improvements to the QE library.
> 
> ...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config stuff.
> 
> Commit 589ffa1c520355e37d5868 in galak/powerpc.git.
> 
> Unfortunately it isn't split, thus it will take time to track faulty bit.
> But so far... maybe you have any ideas?

No.  The changes are supposed to be completely transparent.  I did have to 
modify the ucc_geth driver because of a change in some QE library functions, 
but I tested it on 8360 and it works there.

It could be something peripheral, like a general breakdown of the QE itself on 
85xx.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* Re: [PATCH] Use 1TB segments
From: Will Schmidt @ 2007-10-03 14:22 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, Jon Tollefson
In-Reply-To: <18179.2249.445607.10676@cargo.ozlabs.ibm.com>

On Wed, 2007-10-03 at 13:13 +1000, Paul Mackerras wrote:
> Will Schmidt writes:
> 
> > I still need to test this code for performance issues, and this version
> > could still use some cosmetic touchups, so I dont think we want this to
> > go into a tree yet.  I am reposting this primarily to indicate the prior
> > version isnt quite right, and so Jon can rebase to this version.  :-)
> 
> The way we scan the ibm,processor-segment-sizes property could be
> nicer.  Where there any other cosmetic touchups you were thinking of,
> and if so what were they?  I didn't notice any leftover debugging
> printks or anything else that obviously needed cleaning up.

Correct..  nothing in the patch really *needs* to be cleaned up.  This
is mostly me being way more nit-picky than I need to be.  :-)   I don't
have any real issues with the patch (being candidate for) going into a
tree. 

The only obvious is the MMU_SEGSIZE_* #define's in mmu-hash64.h appear
to be duplicated.

The rest I can follow up on later, none of it affects the code outside
of #ifdef DEBUG's and it should be a separate patch anyway.   

Thanks,
-Will

> Paul.

^ permalink raw reply

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Anton Vorontsov @ 2007-10-03 14:34 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <4703A453.8080305@freescale.com>

On Wed, Oct 03, 2007 at 09:16:51AM -0500, Timur Tabi wrote:
> Anton Vorontsov wrote:
>> Hi Timur,
>> On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote:
>>> This patch makes numerous miscellaneous code improvements to the QE 
>>> library.
>> ...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config 
>> stuff.
>> Commit 589ffa1c520355e37d5868 in galak/powerpc.git.
>> Unfortunately it isn't split, thus it will take time to track faulty bit.
>> But so far... maybe you have any ideas?
>
> No.  The changes are supposed to be completely transparent.  I did have to 
> modify the ucc_geth driver because of a change in some QE library 
> functions, but I tested it on 8360 and it works there.

I see.

> It could be something peripheral, like a general breakdown of the QE itself 
> on 85xx.

Doubtfully, if changes are completely transparent. Because everything works
here without that cleanup.

Ok, thanks anyway, will look further as time will permit.

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

^ permalink raw reply

* Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
From: Grant Likely @ 2007-10-03 14:39 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1191385456.22572.45.camel@pasglop>

On 10/2/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Tue, 2007-10-02 at 22:18 -0600, Grant Likely wrote:
>
> > For many drivers, I think that is already the case.  USB OHCI is a
> > prime example where there are both PCI and platform_bus bindings among
> > others.  It seems to me that the bus binding effectively translates
> > down to "where do I go to get the needed information".  I think it
> > results in less of a maintenance burden to explicitly separate bus
> > binding from device setup as opposed to adding constructor code.
>
> I think nobody consider the mess that is USB in that are to be something
> we want to reproduce.

Heh, true, but the structure of multiple bus bindings is probably not
something we can get away from.

>
> > > The important thing however, with the constructor approach is to try as
> > > much as possible to keep the proper tree structure, and thus, try to
> > > find a way to instanciate the devices with proper parent/child
> > > relationship so that ordering for things like suspend/resume operations
> > > is maintained.
> >
> > I'm not sure I follow.  Example?
>
> Well, make sure that if 2 platform devices repreesnt respectively a bus
> and a device on that bus, they properly get instanciated as parent &
> child in sysfs as well.

Right, okay.  Looking at platform_device_add(), the default parent is
platform_bus, but it can be overridden.  of_platform_bus devices get
the hierarchy of the device tree by default.  So in the platform bus
case, the constructor would need to explicitly set the parent device?
Correct?

Also, how do you see the constructor code getting executed?  Called
explicitly from the platform code, or some form of auto binding?  I
look at fsl_soc.c and I shudder as each constructor does a pass of the
whole tree looking for compatible nodes.

Cheers,
g.

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

^ permalink raw reply

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Timur Tabi @ 2007-10-03 14:39 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071003143417.GA5123@localhost.localdomain>

Anton Vorontsov wrote:

> Doubtfully, if changes are completely transparent. Because everything works
> here without that cleanup.
> 
> Ok, thanks anyway, will look further as time will permit.

I did have one idea - the programming of the GUEMR register in ucc_fast_init() 
could be wrong.  Can do a before/after comparison of the contents of that 
register?


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Kumar Gala @ 2007-10-03 14:43 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <4703A9B4.6010507@freescale.com>


On Oct 3, 2007, at 9:39 AM, Timur Tabi wrote:

> Anton Vorontsov wrote:
>
>> Doubtfully, if changes are completely transparent. Because  
>> everything works
>> here without that cleanup.
>>
>> Ok, thanks anyway, will look further as time will permit.
>
> I did have one idea - the programming of the GUEMR register in  
> ucc_fast_init()
> could be wrong.  Can do a before/after comparison of the contents  
> of that
> register?

I'm dropping this patch from my tree till you guys figure this out.

- k

^ permalink raw reply

* Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
From: Timur Tabi @ 2007-10-03 15:01 UTC (permalink / raw)
  To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071003143417.GA5123@localhost.localdomain>

Anton Vorontsov wrote:

> Ok, thanks anyway, will look further as time will permit.

I think I found it.  Of course, if I'm right, then that doesn't explain how 
the 8360 works.

In struct ucc_geth, add this:

  struct ucc_geth {
  	struct ucc_fast uccf;
+	u8	res9[0x100 - sizeof(struct ucc_fast)];
  	u32 maccfg1;		/* mac configuration reg. 1 */
  	u32 maccfg2;		/* mac configuration reg. 2 */


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ 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