LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* linux @ xup
From: Joachim Meyer @ 2008-01-30 10:03 UTC (permalink / raw)
  To: linuxppc-embedded

Hi

I already succeded in setting up a Linux for the ml310. I'm trying to do it for the XUP Board now. The Problem I have is, that
in every HowTo I read I should set at the EDK's software settings under Library/OS Parameters:
Set PLB_CLOCK_FREQ_HZ to the PLB speed (usually 100000000)

But I can't find where to set it. With the ml310 there was this option. I'm using the EDK Board Definition File (.xbd), Pcores & Drivers from Xilinx:
http://www.xilinx.com/univ/xupv2p.html
EDK Version 9.1 SP2

If I ignore it and build the BSP there comes out an xparameters_ml300.h file which I copy to my Kernel sources.
When I try to compile, I get errors that the PLB_CLOCK_FREQ_HZ isn't defined.
Can I just add it to the xparameters_ml300.h file file (which I rename "xparameters_xupv2p.h") by Hand?

Greez and thx
Joachim
_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114

^ permalink raw reply

* [PATCH v2] 82xx: MGCOGE support
From: Heiko Schocher @ 2008-01-30  9:49 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Scott Wood
In-Reply-To: <479EFE7F.4000104@denx.de>

Hello,

The following patch adds support for the mpc8247 based
board MGCOGE from keymile.

changes to the previous patchset:

- Added the suggestions from Scott Wood:
  http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050957.html

- The patch http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050931.html
  is no longer needed.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 arch/powerpc/boot/dts/mgcoge.dts      |  149 ++++++
 arch/powerpc/configs/mgcoge_defconfig |  821 +++++++++++++++++++++++++++++++++
 arch/powerpc/platforms/82xx/Kconfig   |    9 +
 arch/powerpc/platforms/82xx/Makefile  |    1 +
 arch/powerpc/platforms/82xx/mgcoge.c  |  130 ++++++
 5 files changed, 1110 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mgcoge.dts
 create mode 100644 arch/powerpc/configs/mgcoge_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c

diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
new file mode 100644
index 0000000..63f7cfe
--- /dev/null
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -0,0 +1,149 @@
+/*
+ * Device Tree for the MGCOGE plattform from keymile
+ *
+ * Copyright 2008 DENX Software Engineering GmbH
+ *
+ * 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/;
+/ {
+	model = "MGCOGE";
+	compatible = "keymile,mgcoge";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		ethernet0 = &eth0;
+		serial0 = &smc2;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,8247@0 {
+			device_type = "cpu";
+			reg = <0>;
+			d-cache-line-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <16384>;
+			i-cache-size = <16384>;
+			timebase-frequency = <0>;
+			clock-frequency = <0>;
+			bus-frequency = <0>;
+		};
+	};
+
+	localbus@f0010100 {
+		compatible = "fsl,mpc8247-localbus",
+		             "fsl,pq2-localbus",
+		             "simple-bus";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		reg = <0xf0010100 0x40>;
+
+		ranges = <0 0 0xfe000000 0x00400000>;
+
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0x0 0x400000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			bank-width = <1>;
+			device-width = <1>;
+			partition@0 {
+				label = "u-boot";
+				reg = <0 0x40000>;
+			};
+			partition@40000 {
+				label = "env";
+				reg = <0x40000 0x20000>;
+			};
+			partition@60000 {
+				label = "user";
+				reg = <0x60000 0x3a0000>;
+			};
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0>;
+	};
+
+	soc@f0000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8247-immr", "fsl,pq2-soc", "simple-bus";
+		ranges = <0x00000000 0xf0000000 0x00053000>;
+
+		// Temporary until code stops depending on it.
+		device_type = "soc";
+
+		cpm@119c0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			#interrupt-cells = <2>;
+			compatible = "fsl,mpc8247-cpm", "fsl,cpm2",
+					"simple-bus";
+			reg = <0x119c0 0x30>;
+			ranges;
+
+			muram {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0 0x10000>;
+
+				data@0 {
+					compatible = "fsl,cpm-muram-data";
+					reg = <0x80 0x1f80 0x9800 0x800>;
+				};
+			};
+
+			brg@119f0 {
+				compatible = "fsl,mpc8247-brg",
+				             "fsl,cpm2-brg",
+				             "fsl,cpm-brg";
+				reg = <0x119f0 0x10 0x115f0 0x10>;
+			};
+
+			/* Monitor port/SMC2 */
+			smc2: serial@11a90 {
+				device_type = "serial";
+				compatible = "fsl,mpc8247-smc-uart",
+				             "fsl,cpm2-smc-uart";
+				reg = <0x11a90 0x20 0x40 0x40>;
+				interrupts = <5 8>;
+				interrupt-parent = <&PIC>;
+				fsl,cpm-brg = <2>;
+				fsl,cpm-command = <0x21200000>;
+				current-speed = <115200>;
+			};
+
+			eth0: ethernet@11a60 {
+				device_type = "network";
+				compatible = "fsl,mpc8247-scc-enet",
+				             "fsl,cpm2-scc-enet";
+				reg = <0x11a60 0x20 0x8300 0x100 0x11390 1>;
+				local-mac-address = [ 00 00 00 00 00 00 ];
+				interrupts = <43 8>;
+				interrupt-parent = <&PIC>;
+				linux,network-index = <0>;
+				fsl,cpm-command = <0xce00000>;
+				fixed-link = <0 0 10 0 0>;
+			};
+
+		};
+
+		PIC: interrupt-controller@10c00 {
+			#interrupt-cells = <2>;
+			interrupt-controller;
+			reg = <0x10c00 0x80>;
+			compatible = "fsl,mpc8247-pic", "fsl,pq2-pic";
+		};
+	};
+};
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
new file mode 100644
index 0000000..ff4e33d
--- /dev/null
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -0,0 +1,821 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Wed Jan 30 10:25:12 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+CONFIG_6xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_PPC_MM_SLICES is not set
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+# CONFIG_PPC_UDBG_16550 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# Platform support
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+CONFIG_PPC_82xx=y
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_MPC8272_ADS is not set
+# CONFIG_PQ2FADS is not set
+# CONFIG_EP8248E is not set
+CONFIG_MGCOGE=y
+# CONFIG_PQ2ADS is not set
+CONFIG_8260=y
+CONFIG_8272=y
+# CONFIG_IPIC is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_CPM2=y
+CONFIG_PPC_CPM_NEW_BINDING=y
+# CONFIG_FSL_ULI1575 is not set
+CONFIG_CPM=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_HIBERNATION_UP_POSSIBLE=y
+# CONFIG_SECCOMP is not set
+CONFIG_WANT_DEVICE_TREE=y
+CONFIG_DEVICE_TREE="ep8248e.dts"
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_FSL_SOC=y
+# CONFIG_PCI is not set
+# CONFIG_PCI_DOMAINS is not set
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_BOOT_LOAD=0x00400000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=y
+CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+CONFIG_IPV6_SIT=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+CONFIG_FIXED_PHY=y
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_FS_ENET=y
+CONFIG_FS_ENET_HAS_SCC=y
+# CONFIG_FS_ENET_HAS_FCC is not set
+# CONFIG_FS_ENET_MDIO_FCC is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_CPM=y
+CONFIG_SERIAL_CPM_CONSOLE=y
+# CONFIG_SERIAL_CPM_SCC1 is not set
+# CONFIG_SERIAL_CPM_SCC2 is not set
+# CONFIG_SERIAL_CPM_SCC3 is not set
+# CONFIG_SERIAL_CPM_SCC4 is not set
+CONFIG_SERIAL_CPM_SMC1=y
+CONFIG_SERIAL_CPM_SMC2=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_RTC_CLASS is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+# CONFIG_CRC32 is not set
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_KGDB_CONSOLE is not set
+CONFIG_BDI_SWITCH=y
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+# CONFIG_PPC_CLOCK is not set
+CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index 4fad6c7..f2ea477 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -39,6 +39,15 @@ config EP8248E
 	  This board is also resold by Freescale as the QUICCStart
 	  MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.

+config MGCOGE
+	bool "Keymile MGCOGE"
+	select 8272
+	select 8260
+	select FSL_SOC
+	select PPC_CPM_NEW_BINDING
+	help
+	  This enables support for the Keymile MGCOGE board.
+
 endchoice

 config PQ2ADS
diff --git a/arch/powerpc/platforms/82xx/Makefile b/arch/powerpc/platforms/82xx/Makefile
index 6cd5cd5..d982793 100644
--- a/arch/powerpc/platforms/82xx/Makefile
+++ b/arch/powerpc/platforms/82xx/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_CPM2) += pq2.o
 obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
 obj-$(CONFIG_PQ2FADS) += pq2fads.o
 obj-$(CONFIG_EP8248E) += ep8248e.o
+obj-$(CONFIG_MGCOGE) += mgcoge.o
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c
new file mode 100644
index 0000000..c21e807
--- /dev/null
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -0,0 +1,130 @@
+/*
+ * Keymile mgcoge support
+ * Copyright 2008 DENX Software Engineering GmbH
+ * Author: Heiko Schocher <hs@denx.de>
+ *
+ * based on code from:
+ * Copyright 2007 Freescale Semiconductor, Inc.
+ * Author: Scott Wood <scottwood@freescale.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/init.h>
+#include <linux/interrupt.h>
+#include <linux/fsl_devices.h>
+#include <linux/of_platform.h>
+
+#include <asm/io.h>
+#include <asm/cpm2.h>
+#include <asm/udbg.h>
+#include <asm/machdep.h>
+#include <asm/time.h>
+#include <asm/mpc8260.h>
+#include <asm/prom.h>
+
+#include <sysdev/fsl_soc.h>
+#include <sysdev/cpm2_pic.h>
+
+#include "pq2.h"
+
+static void __init mgcoge_pic_init(void)
+{
+	struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic");
+	if (!np) {
+		printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
+		return;
+	}
+
+	cpm2_pic_init(np);
+	of_node_put(np);
+}
+
+struct cpm_pin {
+	int port, pin, flags;
+};
+
+static __initdata struct cpm_pin mgcoge_pins[] = {
+
+	/* SMC2 */
+	{1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+
+	/* SCC4 */
+	{3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{3,  9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3,  8, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{4, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+};
+
+static void __init init_ioports(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) {
+		const struct cpm_pin *pin = &mgcoge_pins[i];
+		cpm2_set_pin(pin->port, pin->pin, pin->flags);
+	}
+
+	cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8);
+	cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX);
+}
+
+static void __init mgcoge_setup_arch(void)
+{
+	if (ppc_md.progress)
+		ppc_md.progress("mgcoge_setup_arch()", 0);
+
+	cpm2_reset();
+
+	/* When this is set, snooping CPM DMA from RAM causes
+	 * machine checks.  See erratum SIU18.
+	 */
+	clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
+
+	init_ioports();
+
+	if (ppc_md.progress)
+		ppc_md.progress("mgcoge_setup_arch(), finish", 0);
+}
+
+static  __initdata struct of_device_id of_bus_ids[] = {
+	{ .compatible = "simple-bus", },
+	{},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+	of_platform_bus_probe(NULL, of_bus_ids, NULL);
+
+	return 0;
+}
+machine_device_initcall(mgcoge, declare_of_platform_devices);
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mgcoge_probe(void)
+{
+	unsigned long root = of_get_flat_dt_root();
+	return of_flat_dt_is_compatible(root, "keymile,mgcoge");
+}
+
+define_machine(mgcoge)
+{
+	.name = "Keymile MGCOGE",
+	.probe = mgcoge_probe,
+	.setup_arch = mgcoge_setup_arch,
+	.init_IRQ = mgcoge_pic_init,
+	.get_irq = cpm2_get_irq,
+	.calibrate_decr = generic_calibrate_decr,
+	.restart = pq2_restart,
+	.progress = udbg_progress,
+};
-- 
1.5.2.2


bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply related

* Re: [patch v6 3/4] USB: add Cypress c67x00 OTG controller HCD driver
From: Peter Korsgaard @ 2008-01-30  9:35 UTC (permalink / raw)
  To: Alan Stern; +Cc: linuxppc-dev, dbrownell, USB list
In-Reply-To: <Pine.LNX.4.44L0.0801291016370.4083-100000@iolanthe.rowland.org>

>>>>> "Alan" == Alan Stern <stern@rowland.harvard.edu> writes:

 Alan> On Tue, 29 Jan 2008, Peter Korsgaard wrote:
 >> This patch adds HCD support for the Cypress c67x00 family of devices.

 >> --- /dev/null
 >> +++ linux-2.6/drivers/usb/c67x00/c67x00-hcd.c

 >> +int c67x00_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
 >> +{
 >> +	struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd);
 >> +	unsigned long flags;
 >> +	int rc;
 >> +
 >> +	spin_lock_irqsave(&c67x00->lock, flags);
 >> +	rc = usb_hcd_check_unlink_urb(hcd, urb, status);
 >> +	if (rc)
 >> +		goto done;
 >> +
 >> +	c67x00_release_urb(c67x00, urb);
 >> +	usb_hcd_unlink_urb_from_ep(hcd, urb);
 >> +	spin_unlock_irqrestore(&c67x00->lock, flags);
 >> +
 >> +	usb_hcd_giveback_urb(hcd, urb, status);

 Alan> This is wrong.  usb_hcd_giveback_urb() must be called with local
 Alan> interrupts disabled.

Ups, good catch. I've put a spin_unlock() / spin_lock() around it and
moved the _irqrestore down below now.

 >> +/*
 >> + * pre: urb != NULL and c67x00 locked, urb unlocked
 >> + */
 >> +static inline void
 >> +c67x00_giveback_urb(struct c67x00_hcd *c67x00, struct urb *urb, int status)
 >> +{
 >> +	struct c67x00_urb_priv *urbp;
 >> +
 >> +	if (!urb)
 >> +		return;

 Alan> Since you have the documented precondition that urb != NULL, and since
 Alan> this routine is never called in a context where urb could be NULL,
 Alan> there's no need for this test.  Also, I doubt that this routine really
 Alan> needs to be inline (and besides, the compiler is better at making such
 Alan> decisions than we are).

It can be null in c67x00_check_td_list, so it's actually the comment
that's wrong. I've fixed that.

 >> +static void c67x00_sched_done(unsigned long __c67x00)
 >> +{
 >> +	struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00;
 >> +	struct c67x00_urb_priv *urbp, *tmp;
 >> +	struct urb *urb;
 >> +
 >> +	spin_lock(&c67x00->lock);
 >> +
 >> +	/* Loop over the done list and give back all the urbs */
 >> +	list_for_each_entry_safe(urbp, tmp, &c67x00->done_list, hep_node) {
 >> +		urb = urbp->urb;
 >> +		c67x00_release_urb(c67x00, urb);
 >> +		if (!usb_hcd_check_unlink_urb(c67x00_hcd_to_hcd(c67x00),
 >> +					      urb, urbp->status)) {

 Alan> The function call above is completely wrong.  It is meant to be used only
 Alan> from within the dequeue method.

Ahh, so should I just unconditionally do the unlink_urb_from_ep and
giveback_urb?

 >> +			usb_hcd_unlink_urb_from_ep(c67x00_hcd_to_hcd(c67x00),
 >> +						   urb);
 >> +			spin_unlock(&c67x00->lock);
 >> +			usb_hcd_giveback_urb(c67x00_hcd_to_hcd(c67x00), urb,
 >> +					     urbp->status);
 >> +			spin_lock(&c67x00->lock);
 >> +		}
 >> +	}
 >> +	spin_unlock(&c67x00->lock);
 >> +}

 Alan> Is there some reason this routine needs to run in a tasklet?  Why not
 Alan> just call it directly?

Hmm, I don't actually remember anymore. It's was written back in
Spring 2006 by Jan. I'll try moving it out of the tasklet and see what
it gives.

 Alan> Also, the fact that it is in a tasklet means that it runs with
 Alan> interrupts enabled.  Hence your spin_lock() and spin_unlock() calls
 Alan> will not do the right thing.

Ahh, ofcause.

Thanks for the feedback!

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* PCI configuration with multiple PCI controllers
From: Laurent Lagrange @ 2008-01-30  8:37 UTC (permalink / raw)
  To: linuxppc-embedded


Hello,

I have a MPC8641 based board. I try to use the two PCIe controllers. My
firmware configures (physically) the PCI buses as follow:

------------------+
MPC8641 PCIe 1	|	bus 1		+--------------+
			| --------------> | PCI device 0 |
	BUS 0		|			+--------------+
- - - - - - - - - +
MPC8641 PCIe 2	|	bus 3		+--------------+
			| --------------> | PCI device 1 |
	BUS 2		|			+--------------+
------------------+

I launch the Linux image (2.6.23.9). During the Kernel PCI configuration,
buses behind the 2nd MPC8641 PCIe are skipped because its primary bus don't
start at bus number 0. The kernel reconfigure the primary bus number of the
MPC8641 PCIe 2 controller from 2 to 0.

I can patch the kernel to work with my firmware but I don't know if my PCI
configuration is the good one.

What is the common way to configure the PCI for Linux when a new controller
is found: start the bus number to 0 or to the last bus number + 1?

Regards
Laurent

^ permalink raw reply

* Re: [PATCH] [NET]: Remove PowerPC code from fec.c
From: Jeff Garzik @ 2008-01-30  8:41 UTC (permalink / raw)
  To: Jochen Friedrich
  Cc: linux-m68k, Kernel, Linux, linuxppc-dev list, Geert Uytterhoeven,
	netdev@vger.kernel.org, Scott Wood
In-Reply-To: <4799F349.9090102@scram.de>

Jochen Friedrich wrote:
> fec.c is only used on M68k Coldfire CPUs. Remove leftover
> PowerPC code from this driver.
> 
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
>  drivers/net/fec.c |  136 +---------------------------------------------------
>  1 files changed, 3 insertions(+), 133 deletions(-)

Seems OK to me, but I feel I don't have enough knowledge to ACK or NAK. 
  Please pass through an arch tree, thanks.

	Jeff

^ permalink raw reply

* Re: [PATCH] 4xx: Clone haleakala_defconfig from kilauea_defconfig
From: Stefan Roese @ 2008-01-30  6:22 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Stefan, Grant Erickson, linuxppc-embedded@ozlabs.org
In-Reply-To: <20080129184016.423aed6a@zod.rchland.ibm.com>

On Wednesday 30 January 2008, Josh Boyer wrote:
> On Tue, 29 Jan 2008 17:12:09 -0700
>
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
> > On 1/29/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > > On Tue, 29 Jan 2008 16:22:52 -0700
> > >
> > > "Grant Likely" <grant.likely@secretlab.ca> wrote:
> > > > Rather than adding more defconfigs, can we have a single defconfig
> > > > for 440 and another one for 405?  The configs directory is getting a
> > > > bit silly.
> > >
> > > You mean mulitplatform kernels?  Or what do you mean?
> >
> > Yes, multiplatform kernels.
>
> Per IRC, I need patches or time ;)

As long as multiplatform is not available for 4xx I'm ok with this patch: 

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH] net: NEWEMAC: Remove "rgmii-interface" from rgmii matching table
From: Stefan Roese @ 2008-01-30  6:16 UTC (permalink / raw)
  To: linuxppc-dev, benh; +Cc: netdev
In-Reply-To: <20080116090110.1b7b2f00@zod.rchland.ibm.com>

On Wednesday 16 January 2008, Josh Boyer wrote:
> On Wed, 16 Jan 2008 20:53:59 +1100
>
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > On Wed, 2008-01-16 at 10:37 +0100, Stefan Roese wrote:
> > > With the removal the the "rgmii-interface" device_type property from
> > > the dts files, the newemac driver needs an update to only rely on
> > > compatible property.
> > >
> > > Signed-off-by: Stefan Roese <sr@denx.de>
> >
> > I need to test if it works on CAB, can't change the DT on those. I'll
> > let you know tomorrow.
>
> This should be fine on CAB.  The rgmii node has:
>
> compatible = "ibm,rgmii-axon", "ibm,rgmii"
>
> so the match should still catch on the latter.

How about this patch? Ben, if you think this is ok then we should make sure 
that it goes in in this merge-window, since the other dts patch relies on it.

Thanks.

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 0/6] PS3: gelic: gelic updates for 2.6.25
From: Masakazu Mokuno @ 2008-01-30  5:21 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Geert Uytterhoeven, netdev, Linux/PPC Development
In-Reply-To: <20071213181146.BF69.MOKUNO@sm.sony.co.jp>

Hi Jeff,

The patch set I posted on Dec 13 2007 (except v2 of #6) have been
reviewed on the ML and seems to have no more outstanding
comments/requests.
http://marc.info/?l=linux-netdev&m=119754603814092


Is it OK to apply for 2.6.25?  If OK, I'll ask Paul to merge this set
into the powerpc tree with my wireless patch because the dependent patch
set will go into the tree.

best regards

-- 
Masakazu MOKUNO

^ permalink raw reply

* Re: [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)
From: Balbir Singh @ 2008-01-29 13:50 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras, LKML
In-Reply-To: <1201611898.26410.7.camel@concordia>

* Michael Ellerman <michael@ellerman.id.au> [2008-01-30 00:04:58]:

> Why do you check !p after assigning to nid? I assume it's because we
> might have reached the end of the command line, ie. p == NULL, but we're
> still adding memory to the last node? If so it's a it's a little subtle
> and deserves a comment I think.
>

The reason that we check for !p after assigning node id is that, in
case we create fake NUMA nodes, we want nid to be the fake numa node
id and not the real node id or in the non NUMA case, node id 0.

The if (!p) checks to see if we do have more arguments to parse.
 
> Otherwise this looks pretty good.
> 

Thanks!

> cheers
> 
> -- 
> Michael Ellerman
> OzLabs, IBM Australia Development Lab
> 
> wwweb: http://michael.ellerman.id.au
> phone: +61 2 6212 1183 (tie line 70 21183)
> 
> We do not inherit the earth from our ancestors,
> we borrow it from our children. - S.M.A.R.T Person



-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

^ permalink raw reply

* 83xx HDLC Driver Dev - Multiple PHYs?
From: Russell McGuire @ 2008-01-30  5:10 UTC (permalink / raw)
  To: 'Andy Fleming'; +Cc: linuxppc-embedded
In-Reply-To: <D71D9F25-4724-487E-AD07-E848B4608B97@freescale.com>


All,

I have gotten my HDLC driver up to the point where it can register itself
with the Linux kernel. However now I am faced with a dilemma and style
question, that is probably best answered by you driver developers that have
more experience.

I am putting support for multiple PHY's into the HDLC driver, but after
converting it to use the of_device tree, and inserting a UCC@5000 for a
single UCC HDLC driver, it occurred to me that if I insert more devices
(UCC@6000, UCC@7000, UCC@8000) that the driver will attempt to load multiple
times.

So here is the question.

Solution 1:
Should I develop the system to have a single ucc@xxxx entry in the
platform.dts file and have a field(s) like phy-count=<4>, to support
multiple devices? And have each instance of the module contain private data
for one UCC, interrupt handling, etc...  

OR

Solution 2:
Is there a way to have a module know if it has already been loaded, so it
doesn't insert multiple times and then play the rest like Solution 3?

OR

Solution 3:
Have phy-count=4; defined in the driver header, or a module parameter, and
have a single module instance of the driver itself responsible for creating
a single private data structure and setting up multiple UCC's and PHY's?

This also feeds into a question on SET_NETDEV_DEV. How does it react to
multiple net devices attached to a single base driver?

-Russ

> -----Original Message-----
> From: Andy Fleming [mailto:afleming@freescale.com]
> Sent: Tuesday, January 29, 2008 2:33 PM
> To: rmcguire@videopresence.com
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: SET_NETDEV_DEV -> 83xx HDLC Driver??
> 
> 
> On Jan 25, 2008, at 20:43, Russell McGuire wrote:
> 
> > All,
> >
> > I am partly done porting a combination of the 83xx ATM driver and
> > dscc4 HDLC
> > driver into a 83xx HDLC driver.
> >
> > However, encounter a call I don't truly understand.
> >
> > SET_NETDEV_DEV(dev, pointer_to_some_handle);
> >
> > I can see plenty of examples of this registering some kind of PCI
> > device
> > handle, however in this case I am not using a PCI device. So what
> > should the
> > pointer be? Or can this call be ignored, and if so what are the
> > consequences?
> >
> > I see the some of the Freescale Ethernet devices don't use this call.
> >
> > Anyway, can somebody shed some light on if I am going to need this,
> > or a way
> > to get it to work, without creating a PCI device?
> 
> 
> Look at gianfar.c (which uses a platform_device) or ucc_geth (which
> uses an of_device).  Which freescale devices don't use that call?
> We'll fix them.
> 
> Andy

^ permalink raw reply

* which data structure keep IO information.
From: Barisa Kisku @ 2008-01-30  3:42 UTC (permalink / raw)
  To: linuxppc-embedded

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

Hi,
I have to port one customised layer 2 protocol stack and  read, write system
call to access devices in linux-2.4.
At the moment  this is ported in UNIX SVR2/4 operating system.this protocol
uses some common data structure,
i.e "user" in unix srv2/4, which keeps information such as
      u_error = return errorn code
      u_base = base address for I/O
     u_count = bytes remaining for I/O
     u_arg = argument to current system call etc.

so i need to store these information in linux-2.4 implementation for
implementing read/write system calls.so what is/are
corresponding structure in linux-2.4.i went through task_struct, fs_struct,
files_struct etc., but couldn't relate it properly.

Please help me on this .

thanks and regards,
Barisa Kisku

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

^ permalink raw reply

* Request help cross compiler problems
From: 军 @ 2008-01-30  2:37 UTC (permalink / raw)
  To: xxx

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

Hi, all :
 
 
    I would like to migrate to linux SBC a15b (men mikro, mpc8245), I know that the most appropriate kernel 2.4.18 is, I need to know can be used in cross-compiler and version. Such as: eldk 3.0, it may be compiled 2.4.18? ? 
  
 
    Thank you!
 
 
                                                                   gouxiaojun
                                                                   2008.01.30

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

^ permalink raw reply

* Re: ppc64 vecemu compile failure
From: Greg KH @ 2008-01-30  0:40 UTC (permalink / raw)
  To: maximilian attems; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20080130000337.GC25253@stro.at>

On Wed, Jan 30, 2008 at 01:03:37AM +0100, maximilian attems wrote:
> on latest git since driver subsys merge on powerpc64:
> 
> arch/powerpc/kernel/built-in.o: In function `fphalf':
> vecemu.c:(.toc+0x1360): undefined reference to `devices_subsys'
> make[3]: *** [.tmp_vmlinux1] Error 1

See the patches posted on lkml for this already.

thanks,

greg k-h

^ permalink raw reply

* Stephen Cheng is out of the office.
From: Stephen Cheng @ 2008-01-30  2:04 UTC (permalink / raw)
  To: linuxppc-embedded

I will be out of the office starting  01/30/2008 and will not return until
02/13/2008.

This is the Chinese New Year Holiday. I will respond to your message when I
return.

^ permalink raw reply

* Re: ppc64 vecemu compile failure
From: Olof Johansson @ 2008-01-30  1:55 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: linuxppc-dev, Greg Kroah-Hartman, maximilian attems,
	Paul Mackerras
In-Reply-To: <1201657165.15799.0.camel@concordia>

On Wed, Jan 30, 2008 at 12:39:25PM +1100, Michael Ellerman wrote:
> 
> On Tue, 2008-01-29 at 18:56 -0600, Olof Johansson wrote:
> > Hi,
> > 
> > On Wed, Jan 30, 2008 at 01:03:37AM +0100, maximilian attems wrote:
> > > on latest git since driver subsys merge on powerpc64:
> > > 
> > > arch/powerpc/kernel/built-in.o: In function `fphalf':
> > > vecemu.c:(.toc+0x1360): undefined reference to `devices_subsys'
> > > make[3]: *** [.tmp_vmlinux1] Error 1
> 
> > It's a known problem, fixed by:
> > 
> > http://patchwork.ozlabs.org/linuxppc/patch?id=16491
> 
> But begs the question, why is the linker lying to use about vecemu.c
> using devices_subsys?

Yes, that is a good question. fphalf isn't near it either.


-Olof

^ permalink raw reply

* Re: Help: I will port amcc yucca board to denx kernel ARCH=powepc directory.How to config dts file?
From: Josh Boyer @ 2008-01-30  1:49 UTC (permalink / raw)
  To: jie han; +Cc: linuxppc-embedded
In-Reply-To: <593873.20606.qm@web15102.mail.cnb.yahoo.com>

On Tue, 29 Jan 2008 16:11:35 -0800 (PST)
jie han <jiehanca@yahoo.com.cn> wrote:

> Hi all,
> I want to port amcc yucca board denx linux kernel from ARCH=ppc to ARCH=powerpc. I used sequoia.dts for yucca baord demo device tree file.

I would start with the Katmai DTS instead.  It's at least the same CPU
type.

josh

^ permalink raw reply

* Re: [PATCH] hide kernel only code in asm-powerpc/elf.h
From: Michael Ellerman @ 2008-01-30  1:42 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
In-Reply-To: <20080125180841.GA30091@aepfle.de>

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

On Fri, 2008-01-25 at 19:08 +0100, Olaf Hering wrote:
> stuff inside CONFIG_* should not be exported via make headers-install
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> ---
>  include/asm-powerpc/elf.h |    2 ++
>  1 file changed, 2 insertions(+)

Thanks Olaf, I noticed that once but forgot to fix it.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: ppc64 vecemu compile failure
From: Michael Ellerman @ 2008-01-30  1:39 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linuxppc-dev, Greg Kroah-Hartman, maximilian attems,
	Paul Mackerras
In-Reply-To: <20080130005607.GA32622@lixom.net>

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


On Tue, 2008-01-29 at 18:56 -0600, Olof Johansson wrote:
> Hi,
> 
> On Wed, Jan 30, 2008 at 01:03:37AM +0100, maximilian attems wrote:
> > on latest git since driver subsys merge on powerpc64:
> > 
> > arch/powerpc/kernel/built-in.o: In function `fphalf':
> > vecemu.c:(.toc+0x1360): undefined reference to `devices_subsys'
> > make[3]: *** [.tmp_vmlinux1] Error 1

> It's a known problem, fixed by:
> 
> http://patchwork.ozlabs.org/linuxppc/patch?id=16491

But begs the question, why is the linker lying to use about vecemu.c
using devices_subsys?

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [-mm PATCH] updates for hotplug memory remove
From: Yasunori Goto @ 2008-01-30  1:13 UTC (permalink / raw)
  To: Badari Pulavarty; +Cc: linux-mm, Andrew Morton, linuxppc-dev
In-Reply-To: <1201653101.19684.6.camel@dyn9047017100.beaverton.ibm.com>


> > Have you ever tested hotadd(probe) of the removed memory?
> 
> Yes. I did. In my touch testing, I was able to remove memory and add
> it back to the system without any issues.

Oh, really!?

> But again, I didn't force
> the system to use that memory :(

Ah..OK.

> 
> > I'm afraid there are some differences of the status between pre hot-add
> > section and the removed section by this patch. I think the mem_section of
> > removed memory should be invalidated at least.
> 
> I think its a generic issue. Nothing specific for ppc64. Isn't it ? 

Right.
Currently, our machine doesn't have real physical remove feature yet.
(only add).
So, I think testing is not enough around physical removing.
Probably, your box will be first one which can remove physical memory
with Linux. It is good for testing. 
If you notice anything, please let me know. :-)


Bye.

-- 
Yasunori Goto 

^ permalink raw reply

* Re: [PATCH 8/8] Cell IOMMU fixed mapping support
From: Olof Johansson @ 2008-01-30  0:58 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev
In-Reply-To: <200801300154.02358.arnd@arndb.de>

On Wed, Jan 30, 2008 at 01:54:01AM +0100, Arnd Bergmann wrote:

> I don't see how it should be possible here to reuse the 2-4GB range
> for anything else.

Right, that was obvious after Ben's reply as well. Michael's description
made me think the linear mapping was at bus address 2G when it wasn't.


-Olof

^ permalink raw reply

* Re: ppc64 vecemu compile failure
From: Olof Johansson @ 2008-01-30  0:56 UTC (permalink / raw)
  To: maximilian attems; +Cc: linuxppc-dev, Greg Kroah-Hartman, Paul Mackerras
In-Reply-To: <20080130000337.GC25253@stro.at>

Hi,

On Wed, Jan 30, 2008 at 01:03:37AM +0100, maximilian attems wrote:
> on latest git since driver subsys merge on powerpc64:
> 
> arch/powerpc/kernel/built-in.o: In function `fphalf':
> vecemu.c:(.toc+0x1360): undefined reference to `devices_subsys'
> make[3]: *** [.tmp_vmlinux1] Error 1

It's a known problem, fixed by:

http://patchwork.ozlabs.org/linuxppc/patch?id=16491

-Olof

^ permalink raw reply

* Re: [PATCH 8/8] Cell IOMMU fixed mapping support
From: Arnd Bergmann @ 2008-01-30  0:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20080129155048.GA19822@lixom.net>

On Tuesday 29 January 2008, Olof Johansson wrote:
> 
> > > Shouldn't the fixed mapping be between 4G and 8G (and the offset for 1G
> > > is at 5G), to account for the MMIO range at 2-4G?
> > 
> > I don't think so, ie. it works setup like that, but I'm not entirely
> > sure why. Presumably the 2-4GB for MMIO is only for cycles heading out
> > of the CPU.
> 
> Ben denied that being so yesterday. :-)
> 
> If that's the case, then you can stick the dynamic range there for >32GB
> configs, since it's still addressable with 32 bits.
> 

For addresses going from the CPU to the bus, RAM is occupying everything
from zero to SIZE_OF_RAM, while PCI MMIO starts at LARGE_NUMBER+2GB.

As seen from the PCI bus, DMA addresses for RAM range from zero to 2GB,
while the MMIO space is between 2GB and 4GB. The 64 bit space for
the linear mapping is between EVEN_LARGER_NUMBER and
EVEN_LARGER_NUMBER+SIZE_OF_RAM.

The bridge chip remaps EVEN_LARGER_NUMBER to zero when going into the IOMMU,
so that the IOMMU can fit both SIZE_OF_RAM and the dynamic DMA window
into the 32GB bus address range.

I don't see how it should be possible here to reuse the 2-4GB range
for anything else.

	Arnd <><

^ permalink raw reply

* Re: [PATCH] 4xx: Clone haleakala_defconfig from kilauea_defconfig
From: Josh Boyer @ 2008-01-30  0:40 UTC (permalink / raw)
  To: Grant Likely; +Cc: Stefan, Roese, Grant Erickson, linuxppc-embedded@ozlabs.org
In-Reply-To: <fa686aa40801291612m9408b24idda1feac911f593b@mail.gmail.com>

On Tue, 29 Jan 2008 17:12:09 -0700
"Grant Likely" <grant.likely@secretlab.ca> wrote:

> On 1/29/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > On Tue, 29 Jan 2008 16:22:52 -0700
> > "Grant Likely" <grant.likely@secretlab.ca> wrote:
> >
> > > Rather than adding more defconfigs, can we have a single defconfig for
> > > 440 and another one for 405?  The configs directory is getting a bit
> > > silly.
> >
> > You mean mulitplatform kernels?  Or what do you mean?
> 
> Yes, multiplatform kernels.

Per IRC, I need patches or time ;)

josh

^ permalink raw reply

* Re: [-mm PATCH] updates for hotplug memory remove
From: Badari Pulavarty @ 2008-01-30  0:31 UTC (permalink / raw)
  To: Yasunori Goto; +Cc: linux-mm, Andrew Morton, linuxppc-dev
In-Reply-To: <20080129120318.5BDF.Y-GOTO@jp.fujitsu.com>

On Tue, 2008-01-29 at 14:18 +0900, Yasunori Goto wrote:
> Hello. Badari-san.
> 
> Is your patch for notification the event of removing to firmware, right?

Correct. 

> 
> Have you ever tested hotadd(probe) of the removed memory?

Yes. I did. In my touch testing, I was able to remove memory and add
it back to the system without any issues. But again, I didn't force
the system to use that memory :(

> I'm afraid there are some differences of the status between pre hot-add
> section and the removed section by this patch. I think the mem_section of
> removed memory should be invalidated at least.

I think its a generic issue. Nothing specific for ppc64. Isn't it ? 

Thanks,
Badari

> 
> But anyway, this is a great first step for physical memory remove.
> 
> Thanks.
> 
> 
> > On Mon, 2008-01-28 at 16:31 -0800, Badari Pulavarty wrote:
> > 
> > 
> > > 2) Can you replace the following patch with this ?
> > > 
> > > add-remove_memory-for-ppc64-2.patch
> > > 
> > > I found that, I do need arch-specific hooks to get the memory remove
> > > working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch
> > > neutral, but we do need arch specific hooks.
> > > 
> > > Thanks,
> > > Badari
> > 
> > Andrew,
> > 
> > Here is the patch which provides arch-specific code to complete memory
> > remove on ppc64 LPAR. So far, it works fine in my testing - but waiting
> > for ppc-experts for review and completeness. 
> > 
> > FYI.
> > 
> > Thanks,
> > Badari
> > 
> > For memory remove, we need to clean up htab mappings for the
> > section of the memory we are removing.
> > 
> > This patch implements support for removing htab bolted mappings
> > for ppc64 lpar. Other sub-archs, may need to implement similar
> > functionality for the hotplug memory remove to work. 
> > 
> > Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
> > ---
> >  arch/powerpc/mm/hash_utils_64.c       |   23 +++++++++++++++++++++++
> >  arch/powerpc/mm/mem.c                 |    4 +++-
> >  arch/powerpc/platforms/pseries/lpar.c |   15 +++++++++++++++
> >  include/asm-powerpc/machdep.h         |    2 ++
> >  include/asm-powerpc/sparsemem.h       |    1 +
> >  5 files changed, 44 insertions(+), 1 deletion(-)
> > 
> > Index: linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c
> > ===================================================================
> > --- linux-2.6.24-rc8.orig/arch/powerpc/mm/hash_utils_64.c	2008-01-25 08:04:32.000000000 -0800
> > +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c	2008-01-28 11:45:40.000000000 -0800
> > @@ -191,6 +191,24 @@ int htab_bolt_mapping(unsigned long vsta
> >  	return ret < 0 ? ret : 0;
> >  }
> >  
> > +static void htab_remove_mapping(unsigned long vstart, unsigned long vend,
> > +		      int psize, int ssize)
> > +{
> > +	unsigned long vaddr;
> > +	unsigned int step, shift;
> > +
> > +	shift = mmu_psize_defs[psize].shift;
> > +	step = 1 << shift;
> > +
> > +	if (!ppc_md.hpte_removebolted) {
> > +		printk("Sub-arch doesn't implement hpte_removebolted\n");
> > +		return;
> > +	}
> > +
> > +	for (vaddr = vstart; vaddr < vend; vaddr += step)
> > +		ppc_md.hpte_removebolted(vaddr, psize, ssize);
> > +}
> > +
> >  static int __init htab_dt_scan_seg_sizes(unsigned long node,
> >  					 const char *uname, int depth,
> >  					 void *data)
> > @@ -436,6 +454,11 @@ void create_section_mapping(unsigned lon
> >  			_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
> >  			mmu_linear_psize, mmu_kernel_ssize));
> >  }
> > +
> > +void remove_section_mapping(unsigned long start, unsigned long end)
> > +{
> > +	htab_remove_mapping(start, end, mmu_linear_psize, mmu_kernel_ssize);
> > +}
> >  #endif /* CONFIG_MEMORY_HOTPLUG */
> >  
> >  static inline void make_bl(unsigned int *insn_addr, void *func)
> > Index: linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h
> > ===================================================================
> > --- linux-2.6.24-rc8.orig/include/asm-powerpc/sparsemem.h	2008-01-15 20:22:48.000000000 -0800
> > +++ linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h	2008-01-25 08:18:11.000000000 -0800
> > @@ -20,6 +20,7 @@
> >  
> >  #ifdef CONFIG_MEMORY_HOTPLUG
> >  extern void create_section_mapping(unsigned long start, unsigned long end);
> > +extern void remove_section_mapping(unsigned long start, unsigned long end);
> >  #ifdef CONFIG_NUMA
> >  extern int hot_add_scn_to_nid(unsigned long scn_addr);
> >  #else
> > Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c
> > ===================================================================
> > --- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c	2008-01-25 08:16:37.000000000 -0800
> > +++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c	2008-01-25 08:20:33.000000000 -0800
> > @@ -156,7 +156,9 @@ int remove_memory(u64 start, u64 size)
> >  	ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
> >  	if (ret)
> >  		goto out;
> > -	/* Arch-specific calls go here - next patch */
> > +
> > +	start = (unsigned long)__va(start);
> > +	remove_section_mapping(start, start + size);
> >  out:
> >  	return ret;
> >  }
> > Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c	2008-01-15 20:22:48.000000000 -0800
> > +++ linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c	2008-01-28 14:10:58.000000000 -0800
> > @@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate
> >  	BUG_ON(lpar_rc != H_SUCCESS);
> >  }
> >  
> > +static void pSeries_lpar_hpte_removebolted(unsigned long ea,
> > +					   int psize, int ssize)
> > +{
> > +	unsigned long slot, vsid, va;
> > +
> > +	vsid = get_kernel_vsid(ea, ssize);
> > +	va = hpt_va(ea, vsid, ssize);
> > +
> > +	slot = pSeries_lpar_hpte_find(va, psize, ssize);
> > +	BUG_ON(slot == -1);
> > +
> > +	pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
> > +}
> > +
> >  /* Flag bits for H_BULK_REMOVE */
> >  #define HBR_REQUEST	0x4000000000000000UL
> >  #define HBR_RESPONSE	0x8000000000000000UL
> > @@ -597,6 +611,7 @@ void __init hpte_init_lpar(void)
> >  	ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
> >  	ppc_md.hpte_insert	= pSeries_lpar_hpte_insert;
> >  	ppc_md.hpte_remove	= pSeries_lpar_hpte_remove;
> > +	ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
> >  	ppc_md.flush_hash_range	= pSeries_lpar_flush_hash_range;
> >  	ppc_md.hpte_clear_all   = pSeries_lpar_hptab_clear;
> >  }
> > Index: linux-2.6.24-rc8/include/asm-powerpc/machdep.h
> > ===================================================================
> > --- linux-2.6.24-rc8.orig/include/asm-powerpc/machdep.h	2008-01-25 08:04:41.000000000 -0800
> > +++ linux-2.6.24-rc8/include/asm-powerpc/machdep.h	2008-01-28 11:45:17.000000000 -0800
> > @@ -68,6 +68,8 @@ struct machdep_calls {
> >  				       unsigned long vflags,
> >  				       int psize, int ssize);
> >  	long		(*hpte_remove)(unsigned long hpte_group);
> > +	void            (*hpte_removebolted)(unsigned long ea,
> > +					     int psize, int ssize);
> >  	void		(*flush_hash_range)(unsigned long number, int local);
> >  
> >  	/* special for kexec, to be called in real mode, linar mapping is
> > 
> > 
> > --
> > To unsubscribe, send a message with 'unsubscribe linux-mm' in
> > the body to majordomo@kvack.org.  For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 

^ permalink raw reply

* ppc64 vecemu compile failure
From: maximilian attems @ 2008-01-30  0:03 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, Greg Kroah-Hartman

on latest git since driver subsys merge on powerpc64:

arch/powerpc/kernel/built-in.o: In function `fphalf':
vecemu.c:(.toc+0x1360): undefined reference to `devices_subsys'
make[3]: *** [.tmp_vmlinux1] Error 1

^ 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