All of lore.kernel.org
 help / color / mirror / Atom feed
* MPC8266ADS patch
@ 2003-09-11  0:50 Curtis, Allen
  2003-09-11  3:44 ` Dan Malek
  0 siblings, 1 reply; 7+ messages in thread
From: Curtis, Allen @ 2003-09-11  0:50 UTC (permalink / raw)
  To: PPC Embedded


Here is a patch to make MPC8266ADS its own platform. Instead of creating a
new platforms/ads8266.h header, I could have inserted conditional compiles
into the ads8260.h for the memory map differences.

Note: This is enough to get the kernel to build, boot and run. There are
other issues that still need to be addressed.

Thanks


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux 2.4 for PowerPC development tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1380  -> 1.1381
#	arch/ppc/platforms/Makefile	1.45    -> 1.46
#	  arch/ppc/config.in	1.206   -> 1.207
#	arch/ppc/boot/simple/embed_config.c	1.33    -> 1.34
#	arch/ppc/boot/simple/m8260_tty.c	1.3     -> 1.4
#	include/asm-ppc/mpc8260.h	1.17    -> 1.18
#	               (new)	        -> 1.1
arch/ppc/platforms/ads8266.h
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/09	curtisa@irvsoftws21.devdom.local
<mailto:curtisa@irvsoftws21.devdom.local> 	1.1381
# Fixed MPC8266ADS platform configuration and build
# --------------------------------------------
#
diff -Nru a/arch/ppc/boot/simple/embed_config.c
b/arch/ppc/boot/simple/embed_config.c
--- a/arch/ppc/boot/simple/embed_config.c	Tue Sep  9 16:43:58 2003
+++ b/arch/ppc/boot/simple/embed_config.c	Tue Sep  9 16:43:58 2003
@@ -616,7 +616,7 @@
  }
#endif /* RPX6 for testing */
*	#ifdef CONFIG_ADS8260
		+#if defined(CONFIG_ADS8260) || defined(CONFIG_ADS8266)
		void
		embed_config(bd_t **bdp)
	{
	diff -Nru a/arch/ppc/boot/simple/m8260_tty.c
b/arch/ppc/boot/simple/m8260_tty.c
	--- a/arch/ppc/boot/simple/m8260_tty.c	Tue Sep  9 16:43:58 2003
	+++ b/arch/ppc/boot/simple/m8260_tty.c	Tue Sep  9 16:43:58 2003
	@@ -46,7 +46,7 @@
		*/
		while (cp->cp_cpcr & CPM_CR_FLG);
*	#ifdef CONFIG_ADS8260
	+#if defined(CONFIG_ADS8260) || defined(CONFIG_ADS8266)
		/* Enable the RS-232 transceivers.
		*/
		*(volatile uint *)(BCSR_ADDR + 4) &=
	diff -Nru a/arch/ppc/config.in b/arch/ppc/config.in
	--- a/arch/ppc/config.in	Tue Sep  9 16:43:58 2003
	+++ b/arch/ppc/config.in	Tue Sep  9 16:43:58 2003
	@@ -61,6 +61,7 @@
		define_bool CONFIG_SERIAL_CONSOLE y
	   choice 'Machine Type'	\
		"ADS8260	CONFIG_ADS8260	\
*	ADS8266	CONFIG_ADS8266	\
  	EST8260	CONFIG_EST8260	\
  	SBS8260	CONFIG_SBS8260	\
  	RPXSUPER	CONFIG_RPX6	\
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	Tue Sep  9 16:43:58 2003
+++ b/arch/ppc/platforms/Makefile	Tue Sep  9 16:43:58 2003
@@ -64,7 +64,7 @@
ifeq ($(CONFIG_8260),y)
obj-$(CONFIG_PCI)		+= mpc8260_pci9.o
endif
*	ifeq ($(CONFIG_ADS8260),y)
+ifeq ($(CONFIG_ADS8266),y)
obj-$(CONFIG_PCI)		+= mpc8266ads_pci.o
endif
obj-$(CONFIG_ALL_PPC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
diff -Nru a/arch/ppc/platforms/ads8266.h b/arch/ppc/platforms/ads8266.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/ads8266.h	Tue Sep  9 16:43:58 2003
@@ -0,0 +1,87 @@
+
+/*
+ * A collection of structures, addresses, and values associated with + *
the Motorola MPC8266ADS-PCI board.
+ * Copied from the RPX-Classic and SBS8260 stuff.
+ *
+ * Copyright © 2001 Dan Malek (dan@mvista.com <mailto:dan@mvista.com> )
+ */
+#ifdef __KERNEL__
+#ifndef __MACH_ADS8266_DEFS
+#define __MACH_ADS8266_DEFS
+
+#include <linux/config.h>
+
+#include <asm/ppcboot.h>
+
+/* Memory map is configured by the PROM startup.
+ * We just map a few things we need.  The CSR is actually 4 byte-wide + *
registers that can be accessed as 8-, 16-, or 32-bit values.
+ */
+#define IMAP_ADDR		((uint)0xf0000000)
+#define BCSR_ADDR		((uint)0x04500000)
+#define BCSR_SIZE		((uint)(32 * 1024))
+
+/* The ADS8260 has 16, 32-bit wide control/status registers, accessed + *
only on word boundaries.
+ * Not all are used (yet), or are interesting to us (yet).
+ */
+
+/* Things of interest in the CSR.
+*/
+#define BCSR1_FETHIEN		((uint)0x08000000)	/* 0 == enable */
+#define BCSR1_FETH_RST		((uint)0x04000000)	/* 0 == reset */
+#define BCSR1_RS232_EN1		((uint)0x02000000)	/* 0 ==
enable */
+#define BCSR1_RS232_EN2		((uint)0x01000000)	/* 0 ==
enable */
+
+#define PHY_INTERRUPT	SIU_INT_IRQ7
+
+#ifdef CONFIG_PCI
+/* PCI interrupt controller */
+#define PCI_INT_STAT_REG	0x04730000
+#define PCI_INT_MASK_REG	0x04730004
+#define PIRQA			(NR_SIU_INTS + 0)
+#define PIRQB			(NR_SIU_INTS + 1)
+#define PIRQC			(NR_SIU_INTS + 2)
+#define PIRQD			(NR_SIU_INTS + 3)
+
+/*
+ * PCI memory map definitions for MPC8266ADS-PCI.
+ *
+ * processor view
+ *	local address		PCI address		target
+ *	0x80000000-0x9FFFFFFF	0x80000000-0x9FFFFFFF	PCI mem with
prefetch
+ *	0xA0000000-0xBFFFFFFF	0xA0000000-0xBFFFFFFF	PCI mem w/o prefetch
+ *	0xF4000000-0xF7FFFFFF	0x00000000-0x03FFFFFF	PCI IO
+ *
+ * PCI master view
+ *	local address		PCI address		target
+ *	0x00000000-0x1FFFFFFF	0x00000000-0x1FFFFFFF	MPC8266 local memory
+ */
+
+/* window for a PCI master to access MPC8266 memory */
+#define PCI_SLV_MEM_LOCAL	0x00000000	/* Local base */
+#define PCI_SLV_MEM_BUS		0x00000000	/* PCI base */
+
+/* window for the processor to access PCI memory with prefetching */
+#define PCI_MSTR_MEM_LOCAL	0x80000000	/* Local base */
+#define PCI_MSTR_MEM_BUS	0x80000000	/* PCI base   */
+#define PCI_MSTR_MEM_SIZE	0x20000000	/* 512MB */
+
+/* window for the processor to access PCI memory without prefetching */
+#define PCI_MSTR_MEMIO_LOCAL	0xA0000000	/* Local base */
+#define PCI_MSTR_MEMIO_BUS	0xA0000000	/* PCI base   */
+#define PCI_MSTR_MEMIO_SIZE	0x20000000	/* 512MB */
+
+/* window for the processor to access PCI I/O */
+#define PCI_MSTR_IO_LOCAL	0xF4000000	/* Local base */
+#define PCI_MSTR_IO_BUS         0x00000000	/* PCI base   */
+#define PCI_MSTR_IO_SIZE        0x04000000	/* 64MB */
+
+#define _IO_BASE		PCI_MSTR_IO_LOCAL
+#define _ISA_MEM_BASE		PCI_MSTR_MEMIO_LOCAL
+#define PCI_DRAM_OFFSET		PCI_SLV_MEM_BUS
+#endif /* CONFIG_PCI */
+
+#endif /* __MACH_ADS8266_DEFS */
+#endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h
--- a/include/asm-ppc/mpc8260.h	Tue Sep  9 16:43:58 2003
+++ b/include/asm-ppc/mpc8260.h	Tue Sep  9 16:43:58 2003
@@ -28,6 +28,10 @@
#include <platforms/ads8260.h>
#endif

+#ifdef CONFIG_ADS8266
+#include <platforms/ads8266.h>
+#endif
+
#ifdef CONFIG_WILLOW
#include <platforms/willow.h>
#endif


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8266ADS patch
  2003-09-11  0:50 MPC8266ADS patch Curtis, Allen
@ 2003-09-11  3:44 ` Dan Malek
  2003-09-11  7:18   ` Rakesh Jagota
  2003-09-12 15:50   ` MPC8266ADS patch Tom Rini
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Malek @ 2003-09-11  3:44 UTC (permalink / raw)
  To: Curtis, Allen (by way of Allen Curtis <acurtis@onz.com>)
  Cc: PPC Embedded


Curtis, Allen (by way of Allen Curtis ) wrote:

 > Here is a patch to make MPC8266ADS its own platform. Instead of creating a
 > new platforms/ads8266.h header, ....

Will the "other issues to be addressed" cause the need for more definitions
or further #ifdefs in the existing file?  If so, let's just go ahead and
create the new file now and just add to it later.

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8266ADS patch
  2003-09-11  3:44 ` Dan Malek
@ 2003-09-11  7:18   ` Rakesh Jagota
  2003-09-11  7:44     ` PPC 405 Rakesh Jagota
  2003-09-11 13:37     ` Andrew H Pham
  2003-09-12 15:50   ` MPC8266ADS patch Tom Rini
  1 sibling, 2 replies; 7+ messages in thread
From: Rakesh Jagota @ 2003-09-11  7:18 UTC (permalink / raw)
  To: PPC Embedded


hi,

i am trying to integrate IR keyboard to a custom board.
I am having serial console on the boad.

when i am calling handle_scancode in keyboard.c
this statement,

 void handle_scancode(unsigned char scancode, int down)
 {
 -----
 tty = ttytab? ttytab[fg_console]: NULL;
 ;
 }

returns tty=NULL

          __init kbd_init(void)
 {
  ------
  ------
  ttytab = console_driver.table;
 }

in this fuction also ttytab[fg_console] is still NULL

Is serial console is enough to keyboard?

i have frambuffer support on my board. (without HW
      graphic accelerator)

How to enable the frambufffer console on my board.
      (i am attaching the config file below)

===========#
#
CONFIG_PC_KEYBOARD=y
#
# Console drivers
#

#
# Frame-buffer support
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_OF is not set
# CONFIG_FB_CONTROL is not set
# CONFIG_FB_PLATINUM is not set
# CONFIG_FB_VALKYRIE is not set
# CONFIG_FB_CT65550 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_MQ200 is not set
# CONFIG_FB_IT8181 is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_FBCON_ADVANCED=y
# CONFIG_FBCON_MFB is not set
# CONFIG_FBCON_CFB2 is not set
# CONFIG_FBCON_CFB4 is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB16=y
# CONFIG_FBCON_CFB24 is not set
# CONFIG_FBCON_CFB32 is not set
# CONFIG_FBCON_AFB is not set
# CONFIG_FBCON_ILBM is not set
# CONFIG_FBCON_IPLAN2P2 is not set
# CONFIG_FBCON_IPLAN2P4 is not set
# CONFIG_FBCON_IPLAN2P8 is not set
# CONFIG_FBCON_MAC is not set
# CONFIG_FBCON_VGA_PLANES is not set
# CONFIG_FBCON_VGA is not set
# CONFIG_FBCON_HGA is not set
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
CONFIG_FBCON_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_PEARL_8x8 is not set
CONFIG_FONT_ACORN_8x8=y

#
# Input core support
#
CONFIG_INPUT=y
CONFIG_INPUT_KEYBDEV=y
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set

#
# Macintosh device drivers
#

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256

##
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_RWMOUSE is not set



========================================================



Ur suggestions are appreciated
Thanks in advance
Rakesh Jagota


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* PPC 405
  2003-09-11  7:18   ` Rakesh Jagota
@ 2003-09-11  7:44     ` Rakesh Jagota
  2003-09-11 13:37     ` Andrew H Pham
  1 sibling, 0 replies; 7+ messages in thread
From: Rakesh Jagota @ 2003-09-11  7:44 UTC (permalink / raw)
  To: PPC Embedded


hi,

i am trying to integrate IR keyboard to a custom board.
I am having serial console on the boad.

when i am calling handle_scancode in keyboard.c
this statement,

 void handle_scancode(unsigned char scancode, int down)
 {
 -----
 tty = ttytab? ttytab[fg_console]: NULL;
 ;
 }

returns tty=NULL

          __init kbd_init(void)
 {
  ------
  ------
  ttytab = console_driver.table;
 }

in this fuction also ttytab[fg_console] is still NULL

Is serial console is enough to keyboard?

i have frambuffer support on my board. (without HW
      graphic accelerator)

How to enable the frambufffer console on my board.
      (i am attaching the config file below)

===========#
#
CONFIG_PC_KEYBOARD=y
#
# Console drivers
#

#
# Frame-buffer support
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_OF is not set
# CONFIG_FB_CONTROL is not set
# CONFIG_FB_PLATINUM is not set
# CONFIG_FB_VALKYRIE is not set
# CONFIG_FB_CT65550 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_MQ200 is not set
# CONFIG_FB_IT8181 is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_FBCON_ADVANCED=y
# CONFIG_FBCON_MFB is not set
# CONFIG_FBCON_CFB2 is not set
# CONFIG_FBCON_CFB4 is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB16=y
# CONFIG_FBCON_CFB24 is not set
# CONFIG_FBCON_CFB32 is not set
# CONFIG_FBCON_AFB is not set
# CONFIG_FBCON_ILBM is not set
# CONFIG_FBCON_IPLAN2P2 is not set
# CONFIG_FBCON_IPLAN2P4 is not set
# CONFIG_FBCON_IPLAN2P8 is not set
# CONFIG_FBCON_MAC is not set
# CONFIG_FBCON_VGA_PLANES is not set
# CONFIG_FBCON_VGA is not set
# CONFIG_FBCON_HGA is not set
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
CONFIG_FBCON_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_PEARL_8x8 is not set
CONFIG_FONT_ACORN_8x8=y

#
# Input core support
#
CONFIG_INPUT=y
CONFIG_INPUT_KEYBDEV=y
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set

#
# Macintosh device drivers
#

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256

##
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_RWMOUSE is not set

========================================================

Ur suggestions are appreciated
Thanks in advance
Rakesh Jagota

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PPC 405
  2003-09-11  7:18   ` Rakesh Jagota
  2003-09-11  7:44     ` PPC 405 Rakesh Jagota
@ 2003-09-11 13:37     ` Andrew H Pham
  2003-09-12  5:11       ` Rakesh Jagota
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew H Pham @ 2003-09-11 13:37 UTC (permalink / raw)
  To: Rakesh Jagota; +Cc: PPC Embedded


Rakesh,

What kernel are you using?

Andrew Pham

[ Rakesh Jagota <j.rakesh@gdatech.co.in> writes: ]
>
> i am trying to integrate IR keyboard to a custom board.
> I am having serial console on the boad.
>
> when i am calling handle_scancode in keyboard.c
> this statement,
>
>  void handle_scancode(unsigned char scancode, int down)
>  {
>  -----
>  tty = ttytab? ttytab[fg_console]: NULL;
>  ;
>  }
>
> returns tty=NULL
>
>           __init kbd_init(void)
>  {
>   ------
>   ------
>   ttytab = console_driver.table;
>  }
>
> in this fuction also ttytab[fg_console] is still NULL
>
> Is serial console is enough to keyboard?
>
> i have frambuffer support on my board. (without HW
>       graphic accelerator)
>
> How to enable the frambufffer console on my board.
>       (i am attaching the config file below)
[ omitted ]

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PPC 405
  2003-09-11 13:37     ` Andrew H Pham
@ 2003-09-12  5:11       ` Rakesh Jagota
  0 siblings, 0 replies; 7+ messages in thread
From: Rakesh Jagota @ 2003-09-12  5:11 UTC (permalink / raw)
  To: Andrew H Pham; +Cc: PPC Embedded


hi all,
We are using linux from montvista (linux-2.4.17_mvl21). We are
working on custom design board based on vulcan chip -stbx25xx
(IBM405 ppc). The board name is redwood6.

I am getting the following values

in fuction:  handle_scancode()
fg_console=0
ttytab[fg_console]=NULL;

what change i have  to do to get the keys on my serial console.
Thanks in advance
Rakesh

Andrew H Pham wrote:

> Rakesh,
>
> What kernel are you using?
>
> Andrew Pham
>
> [ Rakesh Jagota <j.rakesh@gdatech.co.in> writes: ]
> >
> > i am trying to integrate IR keyboard to a custom board.
> > I am having serial console on the boad.
> >
> > when i am calling handle_scancode in keyboard.c
> > this statement,
> >
> >  void handle_scancode(unsigned char scancode, int down)
> >  {
> >  -----
> >  tty = ttytab? ttytab[fg_console]: NULL;
> >  ;
> >  }
> >
> > returns tty=NULL
> >
> >           __init kbd_init(void)
> >  {
> >   ------
> >   ------
> >   ttytab = console_driver.table;
> >  }
> >
> > in this fuction also ttytab[fg_console] is still NULL
> >
> > Is serial console is enough to keyboard?
> >
> > i have frambuffer support on my board. (without HW
> >       graphic accelerator)
> >
> > How to enable the frambufffer console on my board.
> >       (i am attaching the config file below)
> [ omitted ]
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: MPC8266ADS patch
  2003-09-11  3:44 ` Dan Malek
  2003-09-11  7:18   ` Rakesh Jagota
@ 2003-09-12 15:50   ` Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2003-09-12 15:50 UTC (permalink / raw)
  To: Dan Malek
  Cc: Curtis, Allen (by way of Allen Curtis <acurtis@onz.com>),
	PPC Embedded


On Wed, Sep 10, 2003 at 11:44:32PM -0400, Dan Malek wrote:
>
> Curtis, Allen (by way of Allen Curtis ) wrote:
>
> > Here is a patch to make MPC8266ADS its own platform. Instead of creating a
> > new platforms/ads8266.h header, ....
>
> Will the "other issues to be addressed" cause the need for more definitions
> or further #ifdefs in the existing file?  If so, let's just go ahead and
> create the new file now and just add to it later.

And, better yet, why not just pull all of the ADS8266 bits in _devel now
out to 2.4 proper?  (And, pretty please, for 2.6 as well? :))

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-12 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-11  0:50 MPC8266ADS patch Curtis, Allen
2003-09-11  3:44 ` Dan Malek
2003-09-11  7:18   ` Rakesh Jagota
2003-09-11  7:44     ` PPC 405 Rakesh Jagota
2003-09-11 13:37     ` Andrew H Pham
2003-09-12  5:11       ` Rakesh Jagota
2003-09-12 15:50   ` MPC8266ADS patch Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.