* [PATCH 14/15] [POWERPC] Clear pci_probe_only on 64 bits PowerMac
From: Benjamin Herrenschmidt @ 2007-12-14 4:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1197608163.200976.87755569596.qpush@grosgo>
It should now be safe to re-assign unassigned resources on 64 bits PowerMac
machines (G5s). This clears pci_probe_only on those.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/powermac/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-merge.orig/arch/powerpc/platforms/powermac/pci.c 2007-12-14 15:49:34.000000000 +1100
+++ linux-merge/arch/powerpc/platforms/powermac/pci.c 2007-12-14 15:49:35.000000000 +1100
@@ -1041,8 +1041,8 @@ void __init pmac_pci_init(void)
}
/* pmac_check_ht_link(); */
- /* Tell pci.c to not use the common resource allocation mechanism */
- pci_probe_only = 1;
+ /* We can allocate missing resources if any */
+ pci_probe_only = 0;
#else /* CONFIG_PPC64 */
init_p2pbridge();
^ permalink raw reply
* [PATCH 15/15] [POWERPC] Various fixes to pcibios_enable_device()
From: Benjamin Herrenschmidt @ 2007-12-14 4:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1197608163.200976.87755569596.qpush@grosgo>
Our implementation of pcibios_enable_device() has a couple of problems.
One is that it should not check IORESOURCE_UNSET, as this might be
left dangling after resource assignment (shouldn't but there are
bugs), but instead, we make it check resource->parent which should
be a reliable indication that the resource has been successfully
claimed (it's in the resource tree).
Then, we also need to skip ROM resources that haven't been enabled
as x86 does.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/pci-common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- linux-merge.orig/arch/powerpc/kernel/pci-common.c 2007-12-14 15:49:34.000000000 +1100
+++ linux-merge/arch/powerpc/kernel/pci-common.c 2007-12-14 15:49:36.000000000 +1100
@@ -1147,7 +1147,10 @@ int pcibios_enable_device(struct pci_dev
r = &dev->resource[idx];
if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
continue;
- if (r->flags & IORESOURCE_UNSET) {
+ if ((idx == PCI_ROM_RESOURCE) &&
+ (!(r->flags & IORESOURCE_ROM_ENABLE)))
+ continue;
+ if (r->parent == NULL) {
printk(KERN_ERR "PCI: Device %s not available because"
" of resource collisions\n", pci_name(dev));
return -EINVAL;
^ permalink raw reply
* Re: [PATCH] Fix rounding bug in emulation for double float operating
From: Kumar Gala @ 2007-12-14 5:01 UTC (permalink / raw)
To: Liu Yu; +Cc: linuxppc-dev
In-Reply-To: <11972628522442-git-send-email-b13201@freescale.com>
On Dec 9, 2007, at 11:00 PM, Liu Yu wrote:
>
> This patch fixes rounding bug in emulation for double float
> operating on PowerPC platform.
>
> When pack double float operand, it need to truncate the tail due to
> the limited precision.
> If the truncated part is not zero, the last bit of work bit (totally
> 3 bits) need to '|' 1.
>
> This patch is completed in _FP_FRAC_SRS_2(X,N,sz) (arch/powerpc/math-
> emu/op-2.h).
> Originally the code leftwards rotates the operand to just keep the
> truncated part,
> then check whether it is zero. However, the number it rotates is not
> correct when
> N is not smaller than _FP_W_TYPE_SIZE, and it will cause the work
> bit '|' 1 in the improper case.
>
> This patch fixes this issue.
>
> Signed-off-by: Liu Yu <b13201@freescale.com>
>
> ---
> arch/powerpc/math-emu/op-2.h | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
applied.
- k
^ permalink raw reply
* Re: any more patches for 2.6.24?
From: Kumar Gala @ 2007-12-14 5:02 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18274.3076.467791.719752@cargo.ozlabs.ibm.com>
On Dec 13, 2007, at 10:52 PM, Paul Mackerras wrote:
> Currently I have just this one bugfix queued up to go to Linus for
> 2.6.24:
>
> Stephen Rothwell (1):
> [POWERPC] iSeries: don't printk with HV spinlock held
>
> Does anyone else have bugfixes that need to go in 2.6.24?
I've got a pull request I'm about to send you.
- k
^ permalink raw reply
* Please pull from 'for-2.6.24' branch
From: Kumar Gala @ 2007-12-14 5:04 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Vitaly Bordug
Please pull from 'for-2.6.24' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24
to receive the following updates:
arch/powerpc/configs/mpc8272_ads_defconfig | 6 +++---
arch/powerpc/configs/pq2fads_defconfig | 6 +++---
arch/powerpc/kernel/ppc_ksyms.c | 12 ------------
arch/powerpc/math-emu/op-2.h | 3 ++-
arch/powerpc/sysdev/cpm2_common.c | 3 +--
drivers/net/fs_enet/mac-scc.c | 2 +-
include/asm-powerpc/commproc.h | 3 ---
7 files changed, 10 insertions(+), 25 deletions(-)
Jochen Friedrich (2):
[POWERPC] Fix typo #ifdef -> #ifndef
[POWERPC] Kill non-existent symbols from ksyms and commproc.h
Liu Yu (1):
[POWERPC] Fix rounding bug in emulation for double float operating
Scott Wood (2):
[POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().
[POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC
^ permalink raw reply
* Re: [PATCH 2/2] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
From: Kumar Gala @ 2007-12-14 5:07 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Timur Tabi, linuxppc-dev list
In-Reply-To: <1196716685975-git-send-email-timur@freescale.com>
On Dec 3, 2007, at 3:17 PM, Timur Tabi wrote:
> Updates the ucc_geth device driver to check the new rx-clock-name and
> tx-clock-name properties first. If present, it uses the new function
> qe_clock_source() to obtain the clock source. Otherwise, it checks
> the
> deprecated rx-clock and tx-clock properties.
>
> Update the device trees for 832x, 836x, and 8568 to contain the new
> property
> names only.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>
> This patch applies to Kumar's for-2.6.25 branch. ucc_geth will
> compile but not
> run if my other patch, "qe: add function qe_clock_source" has not
> also been
> applied.
Jeff, I'll take this patch via powerpc.git if you don't have any issue
since its just touching probe/setup bits.
- k
> arch/powerpc/boot/dts/mpc832x_mds.dts | 8 ++--
> arch/powerpc/boot/dts/mpc832x_rdb.dts | 8 ++--
> arch/powerpc/boot/dts/mpc836x_mds.dts | 8 ++--
> arch/powerpc/boot/dts/mpc8568mds.dts | 8 ++--
> drivers/net/ucc_geth.c | 55 ++++++++++++++++++++++++
> ++++++--
> 5 files changed, 67 insertions(+), 20 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/
> boot/dts/mpc832x_mds.dts
> index c64f303..fe54489 100644
> --- a/arch/powerpc/boot/dts/mpc832x_mds.dts
> +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
> @@ -223,8 +223,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <19>;
> - tx-clock = <1a>;
> + rx-clock-name = "clk9";
> + tx-clock-name = "clk10";
> phy-handle = < &phy3 >;
> pio-handle = < &pio3 >;
> };
> @@ -244,8 +244,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <17>;
> - tx-clock = <18>;
> + rx-clock-name = "clk7";
> + tx-clock-name = "clk8";
> phy-handle = < &phy4 >;
> pio-handle = < &pio4 >;
> };
> diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/
> boot/dts/mpc832x_rdb.dts
> index 388c8a7..e68a08b 100644
> --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
> +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
> @@ -202,8 +202,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <20>;
> - tx-clock = <13>;
> + rx-clock-name = "clk16";
> + tx-clock-name = "clk3";
> phy-handle = <&phy00>;
> pio-handle = <&ucc2pio>;
> };
> @@ -223,8 +223,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <19>;
> - tx-clock = <1a>;
> + rx-clock-name = "clk9";
> + tx-clock-name = "clk10";
> phy-handle = <&phy04>;
> pio-handle = <&ucc3pio>;
> };
> diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/
> boot/dts/mpc836x_mds.dts
> index 0b2d2b5..bfd48d0 100644
> --- a/arch/powerpc/boot/dts/mpc836x_mds.dts
> +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
> @@ -254,8 +254,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <0>;
> - tx-clock = <19>;
> + rx-clock-name = "none";
> + tx-clock-name = "clk9";
> phy-handle = < &phy0 >;
> phy-connection-type = "rgmii-id";
> pio-handle = < &pio1 >;
> @@ -276,8 +276,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <0>;
> - tx-clock = <14>;
> + rx-clock-name = "none";
> + tx-clock-name = "clk4";
> phy-handle = < &phy1 >;
> phy-connection-type = "rgmii-id";
> pio-handle = < &pio2 >;
> diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/
> boot/dts/mpc8568mds.dts
> index 5439437..cf45aab 100644
> --- a/arch/powerpc/boot/dts/mpc8568mds.dts
> +++ b/arch/powerpc/boot/dts/mpc8568mds.dts
> @@ -333,8 +333,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <0>;
> - tx-clock = <20>;
> + rx-clock-name = "none";
> + tx-clock-name = "clk16";
> pio-handle = <&pio1>;
> phy-handle = <&phy0>;
> phy-connection-type = "rgmii-id";
> @@ -355,8 +355,8 @@
> */
> mac-address = [ 00 00 00 00 00 00 ];
> local-mac-address = [ 00 00 00 00 00 00 ];
> - rx-clock = <0>;
> - tx-clock = <20>;
> + rx-clock-name = "none";
> + tx-clock-name = "clk16";
> pio-handle = <&pio2>;
> phy-handle = <&phy1>;
> phy-connection-type = "rgmii-id";
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index a3ff270..a93342e 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -3814,6 +3814,7 @@ static int ucc_geth_probe(struct of_device*
> ofdev, const struct of_device_id *ma
> int err, ucc_num, max_speed = 0;
> const phandle *ph;
> const unsigned int *prop;
> + const char *sprop;
> const void *mac_addr;
> phy_interface_t phy_interface;
> static const int enet_to_speed[] = {
> @@ -3846,10 +3847,56 @@ static int ucc_geth_probe(struct of_device*
> ofdev, const struct of_device_id *ma
>
> ug_info->uf_info.ucc_num = ucc_num;
>
> - prop = of_get_property(np, "rx-clock", NULL);
> - ug_info->uf_info.rx_clock = *prop;
> - prop = of_get_property(np, "tx-clock", NULL);
> - ug_info->uf_info.tx_clock = *prop;
> + sprop = of_get_property(np, "rx-clock-name", NULL);
> + if (sprop) {
> + ug_info->uf_info.rx_clock = qe_clock_source(sprop);
> + if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
> + (ug_info->uf_info.rx_clock > QE_CLK24)) {
> + printk(KERN_ERR
> + "ucc_geth: invalid rx-clock-name property\n");
> + return -EINVAL;
> + }
> + } else {
> + prop = of_get_property(np, "rx-clock", NULL);
> + if (!prop) {
> + /* If both rx-clock-name and rx-clock are missing,
> + we want to tell people to use rx-clock-name. */
> + printk(KERN_ERR
> + "ucc_geth: missing rx-clock-name property\n");
> + return -EINVAL;
> + }
> + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
> + printk(KERN_ERR
> + "ucc_geth: invalid rx-clock propperty\n");
> + return -EINVAL;
> + }
> + ug_info->uf_info.rx_clock = *prop;
> + }
> +
> + sprop = of_get_property(np, "tx-clock-name", NULL);
> + if (sprop) {
> + ug_info->uf_info.tx_clock = qe_clock_source(sprop);
> + if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
> + (ug_info->uf_info.tx_clock > QE_CLK24)) {
> + printk(KERN_ERR
> + "ucc_geth: invalid tx-clock-name property\n");
> + return -EINVAL;
> + }
> + } else {
> + prop = of_get_property(np, "rx-clock", NULL);
> + if (!prop) {
> + printk(KERN_ERR
> + "ucc_geth: mising tx-clock-name property\n");
> + return -EINVAL;
> + }
> + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
> + printk(KERN_ERR
> + "ucc_geth: invalid tx-clock property\n");
> + return -EINVAL;
> + }
> + ug_info->uf_info.tx_clock = *prop;
> + }
> +
> err = of_address_to_resource(np, 0, &res);
> if (err)
> return -EINVAL;
> --
> 1.5.2.4
^ permalink raw reply
* Re: [PATCH 4/4] MPC8313 enhanced Local Bus Controller NAND support.
From: Kumar Gala @ 2007-12-14 5:14 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, dwmw2, linux-mtd
In-Reply-To: <20071213171554.GC4459@loki.buserror.net>
Patch title should really be someting like FSL enhanced local bus (not
mpc8313).
On Dec 13, 2007, at 11:15 AM, Scott Wood wrote:
> Signed-off-by: Nick Spence <nick.spence@freescale.com>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/Kconfig | 9 +
> drivers/mtd/nand/Makefile | 1 +
> drivers/mtd/nand/fsl_elbc_nand.c | 1281 +++++++++++++++++++++++++++++
> +++++++++
> 3 files changed, 1291 insertions(+), 0 deletions(-)
> create mode 100644 drivers/mtd/nand/fsl_elbc_nand.c
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 246d451..05d976c 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -306,4 +306,13 @@ config MTD_ALAUDA
> These two (and possibly other) Alauda-based cardreaders for
> SmartMedia and xD allow raw flash access.
>
> +config MTD_NAND_FSL_ELBC
> + tristate "NAND support for Freescale eLBC controllers"
> + depends on MTD_NAND && PPC_OF
> + help
> + Various Freescale chips, including the 8313, include a NAND Flash
> + Controller Module with built-in hardware ECC capabilities.
> + Enabling this option will enable you to use this to control
> + external NAND devices.
> +
> endif # MTD_NAND
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 3ad6c01..d0d4de2 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -29,5 +29,6 @@ obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
> obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
> obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
> obj-$(CONFIG_MTD_ALAUDA) += alauda.o
> +obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
>
> nand-objs := nand_base.o nand_bbt.o
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/
> fsl_elbc_nand.c
> new file mode 100644
> index 0000000..ce8b0bf
> --- /dev/null
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -0,0 +1,1281 @@
> +/* Freescale Enhanced Local Bus Controller NAND driver
> + *
> + * Copyright (c) 2006-2007 Freescale Semiconductor
> + *
> + * Authors: Nick Spence <nick.spence@freescale.com>,
> + * 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.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA
> + */
> +
> +#include <linux/module.h>
> +#include <linux/types.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/string.h>
> +#include <linux/ioport.h>
> +#include <linux/of_platform.h>
> +#include <linux/slab.h>
> +#include <linux/interrupt.h>
> +
> +#include <linux/mtd/mtd.h>
> +#include <linux/mtd/nand.h>
> +#include <linux/mtd/nand_ecc.h>
> +#include <linux/mtd/partitions.h>
> +
> +#include <asm/io.h>
> +
> +
> +//#define ELBC_NAND_DEBUG_LVL 6
undef or something, not C++ comment.
>
> +
> +#ifdef ELBC_NAND_DEBUG_LVL
> +static int fcm_debug_level = ELBC_NAND_DEBUG_LVL;
> +#define FCM_DEBUG(n, args...) \
> + do { \
> + if (n <= fcm_debug_level) \
> + pr_dbg(args); \
> + } while(0)
> +#else
> +#define FCM_DEBUG(n, dev, args...) do { } while(0)
> +#endif
> +
> +#define MAX_BANKS 8
> +#define ERR_BYTE 0xFF /* Value returned for read bytes when read
> failed */
> +#define FCM_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait
> for FCM */
> +
> +struct elbc_bank {
> + u32 br; /**< Base Register */
> +#define BR_BA 0xFFFF8000
> +#define BR_BA_SHIFT 15
> +#define BR_PS 0x00001800
> +#define BR_PS_SHIFT 11
> +#define BR_PS_8 0x00000800 /* Port Size 8 bit */
> +#define BR_PS_16 0x00001000 /* Port Size 16 bit */
> +#define BR_PS_32 0x00001800 /* Port Size 32 bit */
> +#define BR_DECC 0x00000600
> +#define BR_DECC_SHIFT 9
> +#define BR_DECC_OFF 0x00000000 /* HW ECC checking and
> generation off */
> +#define BR_DECC_CHK 0x00000200 /* HW ECC checking on,
> generation off */
> +#define BR_DECC_CHK_GEN 0x00000400 /* HW ECC checking and
> generation on */
> +#define BR_WP 0x00000100
> +#define BR_WP_SHIFT 8
> +#define BR_MSEL 0x000000E0
> +#define BR_MSEL_SHIFT 5
> +#define BR_MS_GPCM 0x00000000 /* GPCM */
> +#define BR_MS_FCM 0x00000020 /* FCM */
> +#define BR_MS_SDRAM 0x00000060 /* SDRAM */
> +#define BR_MS_UPMA 0x00000080 /* UPMA */
> +#define BR_MS_UPMB 0x000000A0 /* UPMB */
> +#define BR_MS_UPMC 0x000000C0 /* UPMC */
> +#define BR_V 0x00000001
> +#define BR_V_SHIFT 0
> +#define BR_RES ~(BR_BA|BR_PS|BR_DECC|BR_WP|BR_MSEL|BR_V)
> +
> + u32 or; /**< Base Register */
> +#define OR0 0x5004
> +#define OR1 0x500C
> +#define OR2 0x5014
> +#define OR3 0x501C
> +#define OR4 0x5024
> +#define OR5 0x502C
> +#define OR6 0x5034
> +#define OR7 0x503C
> +
> +#define OR_GPCM_AM 0xFFFF8000
> +#define OR_GPCM_AM_SHIFT 15
> +#define OR_GPCM_BCTLD 0x00001000
> +#define OR_GPCM_BCTLD_SHIFT 12
> +#define OR_GPCM_CSNT 0x00000800
> +#define OR_GPCM_CSNT_SHIFT 11
> +#define OR_GPCM_ACS 0x00000600
> +#define OR_GPCM_ACS_SHIFT 9
> +#define OR_GPCM_ACS_0b10 0x00000400
> +#define OR_GPCM_ACS_0b11 0x00000600
> +#define OR_GPCM_XACS 0x00000100
> +#define OR_GPCM_XACS_SHIFT 8
> +#define OR_GPCM_SCY 0x000000F0
> +#define OR_GPCM_SCY_SHIFT 4
> +#define OR_GPCM_SCY_1 0x00000010
> +#define OR_GPCM_SCY_2 0x00000020
> +#define OR_GPCM_SCY_3 0x00000030
> +#define OR_GPCM_SCY_4 0x00000040
> +#define OR_GPCM_SCY_5 0x00000050
> +#define OR_GPCM_SCY_6 0x00000060
> +#define OR_GPCM_SCY_7 0x00000070
> +#define OR_GPCM_SCY_8 0x00000080
> +#define OR_GPCM_SCY_9 0x00000090
> +#define OR_GPCM_SCY_10 0x000000a0
> +#define OR_GPCM_SCY_11 0x000000b0
> +#define OR_GPCM_SCY_12 0x000000c0
> +#define OR_GPCM_SCY_13 0x000000d0
> +#define OR_GPCM_SCY_14 0x000000e0
> +#define OR_GPCM_SCY_15 0x000000f0
> +#define OR_GPCM_SETA 0x00000008
> +#define OR_GPCM_SETA_SHIFT 3
> +#define OR_GPCM_TRLX 0x00000004
> +#define OR_GPCM_TRLX_SHIFT 2
> +#define OR_GPCM_EHTR 0x00000002
> +#define OR_GPCM_EHTR_SHIFT 1
> +#define OR_GPCM_EAD 0x00000001
> +#define OR_GPCM_EAD_SHIFT 0
> +
> +#define OR_UPM_AM 0xFFFF8000
> +#define OR_UPM_AM_SHIFT 15
> +#define OR_UPM_XAM 0x00006000
> +#define OR_UPM_XAM_SHIFT 13
> +#define OR_UPM_BCTLD 0x00001000
> +#define OR_UPM_BCTLD_SHIFT 12
> +#define OR_UPM_BI 0x00000100
> +#define OR_UPM_BI_SHIFT 8
> +#define OR_UPM_TRLX 0x00000004
> +#define OR_UPM_TRLX_SHIFT 2
> +#define OR_UPM_EHTR 0x00000002
> +#define OR_UPM_EHTR_SHIFT 1
> +#define OR_UPM_EAD 0x00000001
> +#define OR_UPM_EAD_SHIFT 0
> +
> +#define OR_SDRAM_AM 0xFFFF8000
> +#define OR_SDRAM_AM_SHIFT 15
> +#define OR_SDRAM_XAM 0x00006000
> +#define OR_SDRAM_XAM_SHIFT 13
> +#define OR_SDRAM_COLS 0x00001C00
> +#define OR_SDRAM_COLS_SHIFT 10
> +#define OR_SDRAM_ROWS 0x000001C0
> +#define OR_SDRAM_ROWS_SHIFT 6
> +#define OR_SDRAM_PMSEL 0x00000020
> +#define OR_SDRAM_PMSEL_SHIFT 5
> +#define OR_SDRAM_EAD 0x00000001
> +#define OR_SDRAM_EAD_SHIFT 0
remove all OR_GPCM_*, OR_UPM_*, OR_SDRAM_* not used anywhere
[snip]
>
> +struct elbc_regs {
> + struct elbc_bank bank[8];
> + u8 res0[0x28];
> + u32 mar; /**< UPM Address Register */
> + u8 res1[0x4];
> + u32 mamr; /**< UPMA Mode Register */
> + u32 mbmr; /**< UPMB Mode Register */
> + u32 mcmr; /**< UPMC Mode Register */
> + u8 res2[0x8];
> + u32 mrtpr; /**< Memory Refresh Timer Prescaler
> Register */
> + u32 mdr; /**< UPM Data Register */
> + u8 res3[0x4];
> + u32 lsor; /**< Special Operation Initiation Register
> */
> + u32 lsdmr; /**< SDRAM Mode Register */
> + u8 res4[0x8];
> + u32 lurt; /**< UPM Refresh Timer */
> + u32 lsrt; /**< SDRAM Refresh Timer */
> + u8 res5[0x8];
> + u32 ltesr; /**< Transfer Error Status Register */
> +#define LTESR_BM 0x80000000
> +#define LTESR_FCT 0x40000000
> +#define LTESR_PAR 0x20000000
> +#define LTESR_WP 0x04000000
> +#define LTESR_ATMW 0x00800000
> +#define LTESR_ATMR 0x00400000
> +#define LTESR_CS 0x00080000
> +#define LTESR_CC 0x00000001
> +#define LTESR_NAND_MASK (LTESR_FCT | LTESR_PAR | LTESR_CC)
> + u32 ltedr; /**< Transfer Error Disable Register */
> + u32 lteir; /**< Transfer Error Interrupt Register */
> + u32 lteatr; /**< Transfer Error Attributes Register */
> + u32 ltear; /**< Transfer Error Address Register */
> + u8 res6[0xC];
> + u32 lbcr; /**< Configuration Register */
> +#define LBCR_LDIS 0x80000000
> +#define LBCR_LDIS_SHIFT 31
> +#define LBCR_BCTLC 0x00C00000
> +#define LBCR_BCTLC_SHIFT 22
> +#define LBCR_AHD 0x00200000
> +#define LBCR_LPBSE 0x00020000
> +#define LBCR_LPBSE_SHIFT 17
> +#define LBCR_EPAR 0x00010000
> +#define LBCR_EPAR_SHIFT 16
> +#define LBCR_BMT 0x0000FF00
> +#define LBCR_BMT_SHIFT 8
> +#define LBCR_INIT 0x00040000
> + u32 lcrr; /**< Clock Ratio Register */
> +#define LCRR_DBYP 0x80000000
> +#define LCRR_DBYP_SHIFT 31
> +#define LCRR_BUFCMDC 0x30000000
> +#define LCRR_BUFCMDC_SHIFT 28
> +#define LCRR_ECL 0x03000000
> +#define LCRR_ECL_SHIFT 24
> +#define LCRR_EADC 0x00030000
> +#define LCRR_EADC_SHIFT 16
> +#define LCRR_CLKDIV 0x0000000F
> +#define LCRR_CLKDIV_SHIFT 0
> + u8 res7[0x8];
> + u32 fmr; /**< Flash Mode Register */
> +#define FMR_CWTO 0x0000F000
> +#define FMR_CWTO_SHIFT 12
> +#define FMR_BOOT 0x00000800
> +#define FMR_ECCM 0x00000100
> +#define FMR_AL 0x00000030
> +#define FMR_AL_SHIFT 4
> +#define FMR_OP 0x00000003
> +#define FMR_OP_SHIFT 0
> + u32 fir; /**< Flash Instruction Register */
> +#define FIR_OP0 0xF0000000
> +#define FIR_OP0_SHIFT 28
> +#define FIR_OP1 0x0F000000
> +#define FIR_OP1_SHIFT 24
> +#define FIR_OP2 0x00F00000
> +#define FIR_OP2_SHIFT 20
> +#define FIR_OP3 0x000F0000
> +#define FIR_OP3_SHIFT 16
> +#define FIR_OP4 0x0000F000
> +#define FIR_OP4_SHIFT 12
> +#define FIR_OP5 0x00000F00
> +#define FIR_OP5_SHIFT 8
> +#define FIR_OP6 0x000000F0
> +#define FIR_OP6_SHIFT 4
> +#define FIR_OP7 0x0000000F
> +#define FIR_OP7_SHIFT 0
> +#define FIR_OP_NOP 0x0 /* No operation and end of sequence */
> +#define FIR_OP_CA 0x1 /* Issue current column address */
> +#define FIR_OP_PA 0x2 /* Issue current block+page address
> */
> +#define FIR_OP_UA 0x3 /* Issue user defined address */
> +#define FIR_OP_CM0 0x4 /* Issue command from FCR[CMD0] */
> +#define FIR_OP_CM1 0x5 /* Issue command from FCR[CMD1] */
> +#define FIR_OP_CM2 0x6 /* Issue command from FCR[CMD2] */
> +#define FIR_OP_CM3 0x7 /* Issue command from FCR[CMD3] */
> +#define FIR_OP_WB 0x8 /* Write FBCR bytes from FCM buffer
> */
> +#define FIR_OP_WS 0x9 /* Write 1 or 2 bytes from MDR[AS] */
> +#define FIR_OP_RB 0xA /* Read FBCR bytes to FCM buffer */
> +#define FIR_OP_RS 0xB /* Read 1 or 2 bytes to MDR[AS] */
> +#define FIR_OP_CW0 0xC /* Wait then issue FCR[CMD0] */
> +#define FIR_OP_CW1 0xD /* Wait then issue FCR[CMD1] */
> +#define FIR_OP_RBW 0xE /* Wait then read FBCR bytes */
> +#define FIR_OP_RSW 0xE /* Wait then read 1 or 2 bytes */
> + u32 fcr; /**< Flash Command Register */
> +#define FCR_CMD0 0xFF000000
> +#define FCR_CMD0_SHIFT 24
> +#define FCR_CMD1 0x00FF0000
> +#define FCR_CMD1_SHIFT 16
> +#define FCR_CMD2 0x0000FF00
> +#define FCR_CMD2_SHIFT 8
> +#define FCR_CMD3 0x000000FF
> +#define FCR_CMD3_SHIFT 0
> + u32 fbar; /**< Flash Block Address Register */
> +#define FBAR_BLK 0x00FFFFFF
> + u32 fpar; /**< Flash Page Address Register */
> +#define FPAR_SP_PI 0x00007C00
> +#define FPAR_SP_PI_SHIFT 10
> +#define FPAR_SP_MS 0x00000200
> +#define FPAR_SP_CI 0x000001FF
> +#define FPAR_SP_CI_SHIFT 0
> +#define FPAR_LP_PI 0x0003F000
> +#define FPAR_LP_PI_SHIFT 12
> +#define FPAR_LP_MS 0x00000800
> +#define FPAR_LP_CI 0x000007FF
> +#define FPAR_LP_CI_SHIFT 0
> + u32 fbcr; /**< Flash Byte Count Register */
> +#define FBCR_BC 0x00000FFF
> + u8 res11[0x8];
> + u8 res8[0xF00];
we really should use __be32
- k
^ permalink raw reply
* Re: [PATCH 2/3] mpc82xx: Embedded Planet EP8248E support
From: Kumar Gala @ 2007-12-14 5:19 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20071211212247.GB3620@loki.buserror.net>
On Dec 11, 2007, at 3:22 PM, Scott Wood wrote:
> This board is also resold by Freescale under the names
> "QUICCStart MPC8248 Evaluation System" and "CWH-PPC-8248N-VE".
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/boot/Makefile | 3 +-
> arch/powerpc/boot/dts/ep8248e.dts | 193 +++++++
> arch/powerpc/boot/ep8248e.c | 55 ++
> arch/powerpc/boot/wrapper | 2 +-
> arch/powerpc/configs/ep8248e_defconfig | 864 +++++++++++++++++++++++
> +++++++++
> arch/powerpc/platforms/82xx/Kconfig | 13 +
> arch/powerpc/platforms/82xx/Makefile | 1 +
> arch/powerpc/platforms/82xx/ep8248e.c | 321 ++++++++++++
> include/asm-powerpc/mpc8260.h | 1 +
> 9 files changed, 1451 insertions(+), 2 deletions(-)
> create mode 100644 arch/powerpc/boot/dts/ep8248e.dts
> create mode 100644 arch/powerpc/boot/ep8248e.c
> create mode 100644 arch/powerpc/configs/ep8248e_defconfig
> create mode 100644 arch/powerpc/platforms/82xx/ep8248e.c
>
> diff --git a/arch/powerpc/boot/dts/ep8248e.dts b/arch/powerpc/boot/
> dts/ep8248e.dts
> new file mode 100644
> index 0000000..ee8405d
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/ep8248e.dts
> @@ -0,0 +1,193 @@
> +/*
> + * Device Tree for the Embedded Planet EP8248E board running
> PlanetCore.
> + *
> + * Copyright 2007 Freescale Semiconductor Inc.
> + *
> + * 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.
> + */
> +
Can we make this a /dts-v1/; since its new.
>
> +/ {
> + model = "EP8248E";
> + compatible = "fsl,ep8248e";
> + #address-cells = <1>;
> + #size-cells = <1>;
Add a aliases { } and can we use that instead of linux,network-index
and linux,planetcore-label.
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,8248@0 {
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <d#32>;
> + i-cache-line-size = <d#32>;
> + d-cache-size = <d#16384>;
> + i-cache-size = <d#16384>;
> + timebase-frequency = <0>;
> + clock-frequency = <0>;
> + };
> + };
> +
> + localbus {
> + compatible = "fsl,ep8248e-localbus",
> + "fsl,mpc8248-localbus",
> + "fsl,pq2-localbus";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + reg = <f0010100 40>;
> +
> + ranges = <0 0 fc000000 04000000
> + 1 0 fa000000 00008000>;
> +
> + flash@0,3800000 {
> + compatible = "cfi-flash";
> + reg = <0 3800000 800000>;
> + bank-width = <4>;
> + device-width = <2>;
> + };
> +
> + bcsr@1,0 {
> + #address-cells = <2>;
> + #size-cells = <1>;
> + reg = <1 0 10>;
> + compatible = "fsl,ep8248e-bcsr";
> + ranges;
> +
> + mdio {
> + device_type = "mdio";
> + compatible = "fsl,ep8248e-mdio-bitbang";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <1 8 1>;
> +
> + PHY0: ethernet-phy@0 {
> + interrupt-parent = <&PIC>;
> + reg = <0>;
> + device_type = "ethernet-phy";
> + };
> +
> + PHY1: ethernet-phy@1 {
> + interrupt-parent = <&PIC>;
> + reg = <1>;
> + device_type = "ethernet-phy";
> + };
> + };
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <0 0>;
> + };
> +
> + soc@f0000000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + device_type = "soc";
> + compatible = "fsl,mpc8248", "fsl,pq2-soc";
> + ranges = <00000000 f0000000 00053000>;
> +
> + // Temporary -- will go away once kernel uses ranges for
> get_immrbase().
> + reg = <f0000000 00053000>;
> +
> + cpm@119c0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #interrupt-cells = <2>;
> + compatible = "fsl,mpc8248-cpm", "fsl,cpm2";
> + reg = <119c0 30>;
> + ranges;
> +
> + muram {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0 0 10000>;
> +
> + data@0 {
> + compatible = "fsl,cpm-muram-data";
> + reg = <0 1100 1140 ec0 9800 800>;
> + };
> + };
> +
> + brg@119f0 {
> + compatible = "fsl,mpc8272-brg",
> + "fsl,cpm2-brg",
> + "fsl,cpm-brg";
> + reg = <119f0 10 115f0 10>;
> + };
> +
> + /* Monitor port/SMC1 */
> + serial@11a80 {
> + device_type = "serial";
> + compatible = "fsl,mpc8248-smc-uart",
> + "fsl,cpm2-smc-uart";
> + reg = <11a80 20 1100 40>;
> + interrupts = <4 8>;
> + interrupt-parent = <&PIC>;
> + fsl,cpm-brg = <7>;
> + fsl,cpm-command = <1d000000>;
> + linux,planetcore-label = "SMC1";
> + };
> +
> + /* "Serial" port/SCC1 */
> + serial@11a00 {
> + device_type = "serial";
> + compatible = "fsl,mpc8248-scc-uart",
> + "fsl,cpm2-scc-uart";
> + reg = <11a00 20 8000 100>;
> + interrupts = <28 8>;
> + interrupt-parent = <&PIC>;
> + fsl,cpm-brg = <1>;
> + fsl,cpm-command = <00800000>;
> + linux,planetcore-label = "SCC1";
> + };
> +
> + ethernet@11300 {
> + device_type = "network";
> + compatible = "fsl,mpc8248-fcc-enet",
> + "fsl,cpm2-fcc-enet";
> + reg = <11300 20 8400 100 11390 1>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <20 8>;
> + interrupt-parent = <&PIC>;
> + phy-handle = <&PHY0>;
> + linux,network-index = <0>;
> + fsl,cpm-command = <12000300>;
> + };
> +
> + ethernet@11320 {
> + device_type = "network";
> + compatible = "fsl,mpc8248-fcc-enet",
> + "fsl,cpm2-fcc-enet";
> + reg = <11320 20 8500 100 113b0 1>;
> + local-mac-address = [ 00 00 00 00 00 00 ];
> + interrupts = <21 8>;
> + interrupt-parent = <&PIC>;
> + phy-handle = <&PHY1>;
> + linux,network-index = <1>;
> + fsl,cpm-command = <16200300>;
> + };
> +
> + usb@11b60 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,mpc8248-usb",
> + "fsl,cpm2-usb";
> + reg = <11b60 18 8b00 100>;
> + interrupt-parent = <&PIC>;
> + interrupts = <b 8>;
> + fsl,cpm-command = <2e600000>;
> + };
> + };
> +
> + PIC: interrupt-controller@10c00 {
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + reg = <10c00 80>;
> + compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
> + };
> + };
> +};
- k
^ permalink raw reply
* Re: [PATCH 2/2] powerpc: Add IPIC MSI support
From: Kumar Gala @ 2007-12-14 5:44 UTC (permalink / raw)
To: Li Li; +Cc: linuxppc-dev, kim phillips
In-Reply-To: <1196764760.2573.10.camel@Guyver>
On Dec 4, 2007, at 4:39 AM, Li Li wrote:
> Modified based on discussion on list.
>
> 1. Adopt virq_to_hw routine
> 2. Correct a legacy bug
>
> Implements the IPIC MSI as two level interrupt controller.
>
> Signed-off-by: Tony Li <tony.li@freescale.com>
Tony, have you looked at the 85xx/86xx PCIe MSI mechanism? The 2nd
level PIC handling seems like its pretty similar between IPIC and
MPIC. Would like to see if we could somehow make the code common for
to handle MSIs from both?
- k
^ permalink raw reply
* Re: [PATCH] Fix rounding bug in emulation for double floatoperating
From: Kumar Gala @ 2007-12-14 5:46 UTC (permalink / raw)
To: Zang Roy-r61911; +Cc: linuxppc-dev list, Liu Yu, David Gibson
In-Reply-To: <1197448223.29372.12.camel@localhost.localdomain>
>> When I run this on a G5 (w/HW FP) I get:
>>
>> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
>> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
>> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
>>
>> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
>>
>> and on the 85xx w/FP emu:
>>
>> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
>> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
>> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
>>
>> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
>>
>> Maybe I'm missing where the error is.
> I am missing ...
> It is supposed to run based on previous IEEE 754 patch.
> http://ozlabs.org/pipermail/linuxppc-dev/2007-February/031351.html
I'd really like to see to see a testcase show the issue with "classic
FP emu" on a 85xx system.
(seems like it should be pretty straight forward).
- k
^ permalink raw reply
* Re: Please pull linux-2.6-8xx.git for-paulus branch
From: Kumar Gala @ 2007-12-14 5:47 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20071209115353.1ae09ee1@kernel.crashing.org>
On Dec 9, 2007, at 2:53 AM, Vitaly Bordug wrote:
> On Sat, 8 Dec 2007 09:17:06 -0600
> Kumar Gala wrote:
>
>>
>> On Dec 8, 2007, at 4:09 AM, Vitaly Bordug wrote:
>>
>>> On Sat, 8 Dec 2007 13:00:25 +0300
>>> Vitaly Bordug wrote:
>>>
>>>> Paul,
>>>>
>>>> please do
>>>> git-pull
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/vitb/
>>>> linux-2.6-8xx.git
>>>> for-paulus
>>>>
>>>> to receive the following updates:
>>>>
>>> Forgot to tell that this is .25 material...
>>
>> Vitaly, if you don't mind I'll pull these into my tree for Paul to
>> collect all the FSL stuff in one place.
>>
> I'm ok with either way.
I've pulled this and split the patches between for-2.6.24 (sent pull
request to paulus) and for-2.6.25
- k
^ permalink raw reply
* Re: [PATCH 19/20] [POWERPC] pci32: 4xx embedded platforms want to reassign all PCI resources
From: Stefan Roese @ 2007-12-14 5:48 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071213155946.0e0c39a0@weaponx>
On Thursday 13 December 2007, Josh Boyer wrote:
> > Keeping your embedded design tiny (and thus your own BSP) is one thing,
> > but adding ifdef's all over the place so that somebody can tinify an
> > eval board, I'm less sure about this... but if you want, you can fixup
> > my patches.
>
> I'm not really advocating for ifdefs. If it annoys me enough (which I
> doubt it will), then I'd try to come up with some way to avoid those
> too. For now, I think selecting PCI in Kconfig for those boards is OK.
Yes, I think it is OK to select it this way an those boards since they are
evaluation boards with PCI slots.
Ciao,
Stefan
^ permalink raw reply
* Re: [DTC][PATCH] Fix cross-compile building
From: Kumar Gala @ 2007-12-14 5:57 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Jon Loeliger, stuarth
In-Reply-To: <20071208003604.GH566@localhost.localdomain>
On Dec 7, 2007, at 6:36 PM, David Gibson wrote:
> On Fri, Dec 07, 2007 at 12:28:20PM -0600, Kumar Gala wrote:
>> From: Stuart Hughes <stuarth@freescale.com>
>>
>> This patch allows you to build the DTC source without making the
>> tests directory. This is necessary when cross compiling as the
>> dumptest (and other) files cannot be run/used on the host system.
>> To use this use: 'make TESTS='
>
> I think this is a silly way of doing this. Instead create a new
> target which builds everything but the tests.
>
> Say,
>
> all: cross tests
>
> cross: dtc ftdump libfdt
shouldn't we do this the other way around, it seems odd to build the
tests always or at least as part of the all target.
- k
^ permalink raw reply
* Re: [PATCH] Fix rounding bug in emulation for double floatoperating
From: Zang Roy-r61911 @ 2007-12-14 6:06 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev list, Liu Yu, David Gibson
In-Reply-To: <BB2AC24A-6336-4270-9124-734BCC09F7DA@kernel.crashing.org>
On Fri, 2007-12-14 at 13:46, Kumar Gala wrote:
> >> When I run this on a G5 (w/HW FP) I get:
> >>
> >> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
> >> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
> >> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
> >>
> >> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
> >>
> >> and on the 85xx w/FP emu:
> >>
> >> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
> >> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
> >> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
> >>
> >> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
> >>
> >> Maybe I'm missing where the error is.
> > I am missing ...
> > It is supposed to run based on previous IEEE 754 patch.
> > http://ozlabs.org/pipermail/linuxppc-dev/2007-February/031351.html
>
> I'd really like to see to see a testcase show the issue with "classic
> FP emu" on a 85xx system.
I can understand.
You know, For a 85xx system without the previous patch or other
'classic' powerpc, it is hard to trigger this issue. Although I believe
it is a problem fixed up.
Do you have any idea?
Roy
^ permalink raw reply
* Re: [PATCH] Fix rounding bug in emulation for double floatoperating
From: Kumar Gala @ 2007-12-14 6:14 UTC (permalink / raw)
To: Zang Roy-r61911; +Cc: linuxppc-dev list, Liu Yu, David Gibson
In-Reply-To: <1197612373.10259.9.camel@localhost.localdomain>
On Dec 14, 2007, at 12:06 AM, Zang Roy-r61911 wrote:
> On Fri, 2007-12-14 at 13:46, Kumar Gala wrote:
>>>> When I run this on a G5 (w/HW FP) I get:
>>>>
>>>> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
>>>> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
>>>> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
>>>>
>>>> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
>>>>
>>>> and on the 85xx w/FP emu:
>>>>
>>>> dmul 3fe0000000000000 * 1 = 0 expected 0 (PASS)
>>>> dmul bfe0000000000000 * 1 = 8000000000000000 expected 0 (PASS)
>>>> dmul 8000000000000001 * bfe0000000000000 = 0 expected 0 (PASS)
>>>>
>>>> ddiv 1 / 4000000000000000 = 0 expected 0 (PASS)
>>>>
>>>> Maybe I'm missing where the error is.
>>> I am missing ...
>>> It is supposed to run based on previous IEEE 754 patch.
>>> http://ozlabs.org/pipermail/linuxppc-dev/2007-February/031351.html
>>
>> I'd really like to see to see a testcase show the issue with "classic
>> FP emu" on a 85xx system.
> I can understand.
> You know, For a 85xx system without the previous patch or other
> 'classic' powerpc, it is hard to trigger this issue. Although I
> believe
> it is a problem fixed up.
> Do you have any idea?
maybe I'm missing it, but can we not do the same operation w/classic
FP that you are doing w/SPE fp?
is this in standard rounding mode, etc?
- k
^ permalink raw reply
* Re: [PATCH 2/2] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
From: Jeff Garzik @ 2007-12-14 6:45 UTC (permalink / raw)
To: Kumar Gala; +Cc: netdev, Timur Tabi, linuxppc-dev list
In-Reply-To: <4373ED4B-5EDD-4725-9D99-BE39B0656E19@kernel.crashing.org>
Kumar Gala wrote:
>
> On Dec 3, 2007, at 3:17 PM, Timur Tabi wrote:
>
>> Updates the ucc_geth device driver to check the new rx-clock-name and
>> tx-clock-name properties first. If present, it uses the new function
>> qe_clock_source() to obtain the clock source. Otherwise, it checks the
>> deprecated rx-clock and tx-clock properties.
>>
>> Update the device trees for 832x, 836x, and 8568 to contain the new
>> property
>> names only.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>> ---
>>
>> This patch applies to Kumar's for-2.6.25 branch. ucc_geth will
>> compile but not
>> run if my other patch, "qe: add function qe_clock_source" has not also
>> been
>> applied.
>
> Jeff, I'll take this patch via powerpc.git if you don't have any issue
> since its just touching probe/setup bits.
ACK
^ permalink raw reply
* Re: [PATCH 2/2] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
From: Kumar Gala @ 2007-12-14 7:19 UTC (permalink / raw)
To: Timur Tabi; +Cc: netdev, linuxppc-dev
In-Reply-To: <1196716685975-git-send-email-timur@freescale.com>
On Dec 3, 2007, at 3:17 PM, Timur Tabi wrote:
> Updates the ucc_geth device driver to check the new rx-clock-name and
> tx-clock-name properties first. If present, it uses the new function
> qe_clock_source() to obtain the clock source. Otherwise, it checks
> the
> deprecated rx-clock and tx-clock properties.
>
> Update the device trees for 832x, 836x, and 8568 to contain the new
> property
> names only.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>
> This patch applies to Kumar's for-2.6.25 branch. ucc_geth will
> compile but not
> run if my other patch, "qe: add function qe_clock_source" has not
> also been
> applied.
>
> arch/powerpc/boot/dts/mpc832x_mds.dts | 8 ++--
> arch/powerpc/boot/dts/mpc832x_rdb.dts | 8 ++--
> arch/powerpc/boot/dts/mpc836x_mds.dts | 8 ++--
> arch/powerpc/boot/dts/mpc8568mds.dts | 8 ++--
> drivers/net/ucc_geth.c | 55 ++++++++++++++++++++++++
> ++++++--
> 5 files changed, 67 insertions(+), 20 deletions(-)
applied.
- k
^ permalink raw reply
* Please pull from 'for-2.6.25' branch
From: Kumar Gala @ 2007-12-14 7:58 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Please pull from 'for-2.6.25' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.25
to receive the following updates:
Documentation/powerpc/booting-without-of.txt | 19
arch/powerpc/boot/dts/kuroboxHD.dts | 16
arch/powerpc/boot/dts/kuroboxHG.dts | 16
arch/powerpc/boot/dts/lite5200.dts | 6
arch/powerpc/boot/dts/lite5200b.dts | 6
arch/powerpc/boot/dts/mpc8313erdb.dts | 36 -
arch/powerpc/boot/dts/mpc832x_mds.dts | 45 -
arch/powerpc/boot/dts/mpc832x_rdb.dts | 47 -
arch/powerpc/boot/dts/mpc8349emitx.dts | 54 -
arch/powerpc/boot/dts/mpc8349emitxgp.dts | 32
arch/powerpc/boot/dts/mpc834x_mds.dts | 51 -
arch/powerpc/boot/dts/mpc836x_mds.dts | 47 -
arch/powerpc/boot/dts/mpc8540ads.dts | 59 -
arch/powerpc/boot/dts/mpc8541cds.dts | 41 -
arch/powerpc/boot/dts/mpc8544ds.dts | 59 +
arch/powerpc/boot/dts/mpc8548cds.dts | 68 +-
arch/powerpc/boot/dts/mpc8555cds.dts | 41 -
arch/powerpc/boot/dts/mpc8560ads.dts | 59 -
arch/powerpc/boot/dts/mpc8568mds.dts | 80 +-
arch/powerpc/boot/dts/mpc8572ds.dts | 59 +
arch/powerpc/boot/dts/mpc8610_hpcd.dts | 28
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 80 +-
arch/powerpc/boot/dts/mpc866ads.dts | 156 ++--
arch/powerpc/configs/mpc837x_mds_defconfig | 878 +++++++++++++++++++++++++++
arch/powerpc/kernel/cputable.c | 13
arch/powerpc/kernel/traps.c | 25
arch/powerpc/platforms/82xx/pq2fads.c | 2
arch/powerpc/platforms/83xx/Kconfig | 11
arch/powerpc/platforms/83xx/Makefile | 1
arch/powerpc/platforms/83xx/mpc8313_rdb.c | 4
arch/powerpc/platforms/83xx/mpc832x_mds.c | 4
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2
arch/powerpc/platforms/83xx/mpc834x_mds.c | 21
arch/powerpc/platforms/83xx/mpc836x_mds.c | 4
arch/powerpc/platforms/83xx/mpc837x_mds.c | 104 +++
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4
arch/powerpc/platforms/8xx/Kconfig | 1
arch/powerpc/platforms/8xx/mpc86xads.h | 44 -
arch/powerpc/platforms/8xx/mpc86xads_setup.c | 289 ++------
arch/powerpc/sysdev/commproc.c | 47 +
arch/powerpc/sysdev/cpm2_common.c | 25
arch/powerpc/sysdev/fsl_soc.c | 23
arch/powerpc/sysdev/ipic.c | 219 ++++--
arch/powerpc/sysdev/ipic.h | 13
arch/powerpc/sysdev/qe_lib/qe.c | 46 +
drivers/net/fs_enet/mac-fcc.c | 10
drivers/net/fs_enet/mac-scc.c | 11
drivers/net/ucc_geth.c | 55 +
drivers/serial/cpm_uart/cpm_uart_cpm1.c | 6
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 8
include/asm-powerpc/cpm.h | 1
include/asm-powerpc/immap_86xx.h | 25
include/asm-powerpc/ipic.h | 12
include/asm-powerpc/qe.h | 95 +-
include/asm-powerpc/reg_booke.h | 13
55 files changed, 2214 insertions(+), 907 deletions(-)
Jochen Friedrich (2):
[POWERPC] Add support for PORTA and PORTB odr registers
[POWERPC] Move CPM command handling into the cpm drivers
Jon Loeliger (2):
[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.
[POWERPC] 86xx: Add aliases node to 8641hpcn DTS file.
Kumar Gala (5):
[POWERPC] Add SPRN for Embedded registers specified in PowerISA 2.04
[POWERPC] Emulate isel (Integer Select) instruction
[POWERPC] FSL: I2C device tree cleanups
[POWERPC] FSL: enet device tree cleanups
[POWERPC] FSL: Added aliases node to device trees
Li Yang (5):
[POWERPC] add e300c4 entry to cputable
[POWERPC] ipic: add new interrupts introduced by new chip
[POWERPC] 83xx: Add platform support for MPC837x MDS board
[POWERPC] 83xx: Add MPC837x MDS default kernel configuration
[POWERPC] ipic: ack only for edge interrupts
Scott Wood (3):
[POWERPC] 8xx: Convert mpc866ads to the new device binding.
[POWERPC] 83xx: mpc834x_mds: Fix whitespace and call of_platform_bus_probe().
[POWERPC] 83xx: mpc8313erdb: Fix whitespace.
Timur Tabi (4):
[POWERPC] 86xx: fix guts_set_dmacr() and add guts_set_pmuxcr_dma() to immap_86xx.h
[POWERPC] QE: change qe_setbrg() to take an enum qe_clock instead of an integer
[POWERPC] qe: add function qe_clock_source()
[POWERPC] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
^ permalink raw reply
* [PATCH] [POWERPC] pasemi: export pasemi_dma_init()
From: Olof Johansson @ 2007-12-14 8:06 UTC (permalink / raw)
To: jgarzik; +Cc: linuxppc-dev
Forgot to export this one. Needed when pasemi_mac is compiled as a module.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
Jeff, since the dma_lib stuff went up through netdev-2.6, please apply and
feed this one up with the rest.
Thanks,
Olof
Index: 2.6.24/arch/powerpc/platforms/pasemi/dma_lib.c
===================================================================
--- 2.6.24.orig/arch/powerpc/platforms/pasemi/dma_lib.c
+++ 2.6.24/arch/powerpc/platforms/pasemi/dma_lib.c
@@ -485,3 +485,4 @@ out:
spin_unlock(&init_lock);
return err;
}
+EXPORT_SYMBOL(pasemi_dma_init);
^ permalink raw reply
* Re: [PATCH] [POWERPC] Emulate isel (Integer Select) instruction
From: Olof Johansson @ 2007-12-14 8:12 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.62.0711291612290.24058@pademelon.sonytel.be>
On Thu, Nov 29, 2007 at 04:13:14PM +0100, Geert Uytterhoeven wrote:
> On Wed, 28 Nov 2007, Geert Uytterhoeven wrote:
> > +static inline void warn_emulated_sysctl_register(void)
> > +{
> > + int res = register_sysctl_table(warn_emulated_sysctl_root);
> ^^^^^^^^^^
> > + printk("@@@ register_sysctl_table() returned %d\n", res);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > +}
>
> Woops, that part shouldn't have been there...
Care to resubmit a clean patch under a fresh subject? Paul didn't chime
in but hopefully he can pick it up for 2.6.25.
Thanks,
Olof
^ permalink raw reply
* Re: [PATCH] [POWERPC] Emulate isel (Integer Select) instruction
From: Kumar Gala @ 2007-12-14 8:08 UTC (permalink / raw)
To: Olof Johansson; +Cc: Geert Uytterhoeven, linuxppc-dev
In-Reply-To: <20071214081210.GB27284@lixom.net>
On Dec 14, 2007, at 2:12 AM, Olof Johansson wrote:
> On Thu, Nov 29, 2007 at 04:13:14PM +0100, Geert Uytterhoeven wrote:
>> On Wed, 28 Nov 2007, Geert Uytterhoeven wrote:
>>> +static inline void warn_emulated_sysctl_register(void)
>>> +{
>>> + int res = register_sysctl_table(warn_emulated_sysctl_root);
>> ^^^^^^^^^^
>>> + printk("@@@ register_sysctl_table() returned %d\n", res);
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> +}
>>
>> Woops, that part shouldn't have been there...
>
> Care to resubmit a clean patch under a fresh subject? Paul didn't
> chime
> in but hopefully he can pick it up for 2.6.25.
I'd say wait for Paul to pickup my 2.6.25 request. Than the base will
have the isel emulation as well.
- k
^ permalink raw reply
* Re: [PATCH] [POWERPC] Emulate isel (Integer Select) instruction
From: Olof Johansson @ 2007-12-14 8:16 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev
In-Reply-To: <20071214081210.GB27284@lixom.net>
On Fri, Dec 14, 2007 at 02:12:10AM -0600, Olof Johansson wrote:
> Care to resubmit a clean patch under a fresh subject? Paul didn't chime
> in but hopefully he can pick it up for 2.6.25.
Next time I will take the time to re-read the whole thread. :)
Seems like the open question was how to warn only for excessive
amounts of emulated ops. Maybe a simple count/threshold per process
(+ printk_ratelimit)? Warning on every power of 10 occurrances was also
suggested, either works for me.
-Olof
^ permalink raw reply
* Re: [PATCH] [POWERPC] Emulate isel (Integer Select) instruction
From: Olof Johansson @ 2007-12-14 8:17 UTC (permalink / raw)
To: Kumar Gala; +Cc: Geert Uytterhoeven, linuxppc-dev
In-Reply-To: <77815911-B0FA-4FFD-AC50-5C9A8FED90C4@kernel.crashing.org>
On Fri, Dec 14, 2007 at 02:08:14AM -0600, Kumar Gala wrote:
> I'd say wait for Paul to pickup my 2.6.25 request. Than the base will
> have the isel emulation as well.
It was spotting the isel patch in your queue that made me go back and
look at the thread. :)
-Olof
^ permalink raw reply
* Re: [PATCH] add MPC837x MDS board default device tree
From: Kumar Gala @ 2007-12-14 8:12 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Li Yang
In-Reply-To: <20071207020130.GA26412@localhost.localdomain>
On Dec 6, 2007, at 8:01 PM, David Gibson wrote:
> On Wed, Dec 05, 2007 at 06:37:53PM +0800, Li Yang wrote:
>> Signed-off-by: Li Yang <leoli@freescale.com>
>> ---
>> Update SATA nodes; remove serdes nodes; add aliases and labels.
>>
>> arch/powerpc/boot/dts/mpc8377_mds.dts | 270 +++++++++++++++++++++++
>> ++++++++
>> arch/powerpc/boot/dts/mpc8378_mds.dts | 256 +++++++++++++++++++++++
>> ++++++
>> arch/powerpc/boot/dts/mpc8379_mds.dts | 284 +++++++++++++++++++++++
>> ++++++++++
>> 3 files changed, 810 insertions(+), 0 deletions(-)
>> create mode 100644 arch/powerpc/boot/dts/mpc8377_mds.dts
>> create mode 100644 arch/powerpc/boot/dts/mpc8378_mds.dts
>> create mode 100644 arch/powerpc/boot/dts/mpc8379_mds.dts
>>
>> diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/
>> boot/dts/mpc8377_mds.dts
>> new file mode 100644
>> index 0000000..919ffd0
>> --- /dev/null
>> +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
> [snip]
>> + aliases {
>> + ethernet0 = "/soc@e0000000/ethernet@24000";
>> + ethernet1 = "/soc@e0000000/ethernet@25000";
>> + serial0 = "/soc@e0000000/serial@4500";
>> + serial1 = "/soc@e0000000/serial@4600";
>> + pci0 = "/pci@e0008500";
>
> You can use path references for these now.
>
>> + };
>> +
>> + cpus {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + PowerPC,837x@0 {
>
> This should absolutely not have a "x" in it. Either have an exact
> model, or just use "cpu@9" (in which case you can put the model in
> "compatible").
>
> [snip]
>> + i2c@3000 {
>> + device_type = "i2c";
>
> Drop the device_type. No "i2c" device_type class is defined.
>
> [snip]
>> + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
>> + usb@23000 {
>> + device_type = "usb";
>
> Drop device_type here too.
>
>> + compatible = "fsl-usb2-dr";
>> + reg = <23000 1000>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + interrupt-parent = < &ipic >;
>> + interrupts = <26 8>;
>> + phy_type = "utmi_wide";
>> + };
>> +
>> + mdio@24520 {
>> + device_type = "mdio";
>> + compatible = "gianfar";
>
> Grr... not your fault, but this crap in the gianfar driver where it
> uses the same compatible property for the mdio and MAC has to be
> fixed.
I've fixed this now. Look at my tree/patch.
> [snip]
>
>> + serial1:serial@4600 {
>
> Standard style puts a space after the colon.
>
>> + device_type = "serial";
>> + compatible = "ns16550";
>> + reg = <4600 100>;
>> + clock-frequency = <0>;
>> + interrupts = <a 8>;
>> + interrupt-parent = < &ipic >;
>> + };
>> +
>> + crypto@30000 {
>> + model = "SEC3";
>> + compatible = "talitos";
>
> This driver, also, needs fixing to recognize a better formatted
> compatible property.
Can you respin with David's changes as well as mirror my cleanup of
the other 83xx/85xx .dts
- k
^ permalink raw reply
* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
From: Olof Johansson @ 2007-12-14 8:23 UTC (permalink / raw)
To: Scott Wood
Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev
In-Reply-To: <20071205183912.GA4516@loki.buserror.net>
On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> > On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > > > tristate "Generic platform device PATA support"
> > > > - depends on EMBEDDED || ARCH_RPC
> > > > + depends on EMBEDDED || ARCH_PPC
> > >
> > > It needs to be || PPC, not || ARCH_PPC.
> > >
> > Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.
>
> Why is it dependent on anything other than platform bus support and ATA?
There's no way to specify dependency on platform bus as a config option,
that's likely what EMBEDDED was meant to do. Some platforms have platform
bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
to be among those. PPC too.
-Olof
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox