* [RFC] PMU: replace information ioctls and schedule for removal
From: Johannes Berg @ 2007-11-08 12:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
This patch adds sysfs attributes to the PMU to allow getting
the information on the PMU type and whether adb is present from
there instead of via the ioctl. The ioctl is made optional and
scheduled for removal.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Documentation/feature-removal-schedule.txt | 8 ++++++
drivers/macintosh/Kconfig | 11 ++++++++
drivers/macintosh/via-pmu.c | 36 +++++++++++++++++++++++++++++
3 files changed, 55 insertions(+)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-11-08 11:48:48.292846681 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-11-08 11:48:53.112861818 +0100
@@ -2533,10 +2533,12 @@ pmu_ioctl(struct inode * inode, struct f
#endif /* CONFIG_INPUT_ADBHID */
#endif /* CONFIG_PMAC_BACKLIGHT_LEGACY */
+#ifdef CONFIG_DEPRECATED_PMU_INFO_IOCTLS
case PMU_IOC_GET_MODEL:
return put_user(pmu_kind, argp);
case PMU_IOC_HAS_ADB:
return put_user(pmu_has_adb, argp);
+#endif
}
return error;
}
@@ -2680,6 +2682,39 @@ static int pmu_sys_resume(struct sys_dev
#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
+static ssize_t show_kind(struct sys_device *sysdev, char *buf)
+{
+ return sprintf(buf, "%d\n", pmu_kind);
+}
+
+static ssize_t show_has_adb(struct sys_device *sysdev, char *buf)
+{
+ return sprintf(buf, "%d\n", pmu_has_adb);
+}
+
+static SYSDEV_ATTR(kind, 0444, show_kind, NULL);
+static SYSDEV_ATTR(has_adb, 0444, show_has_adb, NULL);
+
+int pmu_sys_add(struct sys_device *sysdev)
+{
+ int err;
+
+ err = sysdev_create_file(sysdev, &attr_kind);
+ if (err)
+ goto out;
+
+ err = sysdev_create_file(sysdev, &attr_has_adb);
+ if (err)
+ goto out_remove_kind;
+
+ return 0;
+
+ out_remove_kind:
+ sysdev_remove_file(sysdev, &attr_kind);
+ out:
+ return err;
+}
+
static struct sysdev_class pmu_sysclass = {
set_kset_name("pmu"),
};
@@ -2693,6 +2728,7 @@ static struct sysdev_driver driver_pmu =
.suspend = &pmu_sys_suspend,
.resume = &pmu_sys_resume,
#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
+ .add = &pmu_sys_add,
};
static int __init init_pmu_sysfs(void)
--- everything.orig/Documentation/feature-removal-schedule.txt 2007-11-08 11:47:39.502844564 +0100
+++ everything/Documentation/feature-removal-schedule.txt 2007-11-08 11:48:53.122870607 +0100
@@ -342,3 +342,11 @@ Why: This driver has been marked obsolet
Who: Stephen Hemminger <shemminger@linux-foundation.org>
---------------------------
+
+What: /dev/pmu information ioctls
+When: January 2010
+Files: drivers/macintosh/via-pmu.c
+Why: The PMU information can be obtained from sysfs now.
+Who: Johannes Berg <johannes@sipsolutions.net>
+
+---------------------------
--- everything.orig/drivers/macintosh/Kconfig 2007-11-08 11:47:39.422844727 +0100
+++ everything/drivers/macintosh/Kconfig 2007-11-08 11:48:53.122870607 +0100
@@ -87,6 +87,17 @@ config ADB_PMU
this device; you should do so if your machine is one of those
mentioned above.
+config DEPRECATED_PMU_INFO_IOCTLS
+ bool "Support deprecated PMU information ioctl"
+ depends on ADB_PMU
+ default y
+ help
+ The PMU ioctl supports getting information on the type of PMU and
+ whether an ADB is present. This information is also available in
+ sysfs so this ioctl is no longer needed.
+
+ If in doubt, say Y even if you will not use the ioctl.
+
config ADB_PMU_LED
bool "Support for the Power/iBook front LED"
depends on ADB_PMU
^ permalink raw reply
* [RFC] PMU: don't lock_kernel()
From: Johannes Berg @ 2007-11-08 12:01 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
I see nothing that this lock_kernel() actually protects against
so remove it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu.c | 3 ---
1 file changed, 3 deletions(-)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-11-08 11:48:37.192845813 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-11-08 11:48:48.292846681 +0100
@@ -33,7 +33,6 @@
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/cuda.h>
-#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/pm.h>
@@ -2436,7 +2435,6 @@ pmu_release(struct inode *inode, struct
struct pmu_private *pp = file->private_data;
unsigned long flags;
- lock_kernel();
if (pp != 0) {
file->private_data = NULL;
spin_lock_irqsave(&all_pvt_lock, flags);
@@ -2450,7 +2448,6 @@ pmu_release(struct inode *inode, struct
kfree(pp);
}
- unlock_kernel();
return 0;
}
^ permalink raw reply
* [RFC] PMU: remove dead code
From: Johannes Berg @ 2007-11-08 12:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
Some code in via-pmu.c is never compiled because of "compile options"
within the file. Remove the code completely.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu.c | 42 +-----------------------------------------
1 file changed, 1 insertion(+), 41 deletions(-)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-11-08 11:47:42.332847765 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-11-08 11:48:37.192845813 +0100
@@ -65,9 +65,7 @@
#include "via-pmu-event.h"
/* Some compile options */
-#undef SUSPEND_USES_PMU
#define DEBUG_SLEEP
-#undef HACKED_PCI_SAVE
/* Misc minor number allocated for /dev/pmu */
#define PMU_MINOR 154
@@ -1255,9 +1253,7 @@ void
pmu_suspend(void)
{
unsigned long flags;
-#ifdef SUSPEND_USES_PMU
- struct adb_request *req;
-#endif
+
if (!via)
return;
@@ -1275,17 +1271,10 @@ pmu_suspend(void)
via_pmu_interrupt(0, NULL);
spin_lock_irqsave(&pmu_lock, flags);
if (!adb_int_pending && pmu_state == idle && !req_awaiting_reply) {
-#ifdef SUSPEND_USES_PMU
- pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0);
- spin_unlock_irqrestore(&pmu_lock, flags);
- while(!req.complete)
- pmu_poll();
-#else /* SUSPEND_USES_PMU */
if (gpio_irq >= 0)
disable_irq_nosync(gpio_irq);
out_8(&via[IER], CB1_INT | IER_CLR);
spin_unlock_irqrestore(&pmu_lock, flags);
-#endif /* SUSPEND_USES_PMU */
break;
}
} while (1);
@@ -1306,18 +1295,11 @@ pmu_resume(void)
return;
}
adb_int_pending = 1;
-#ifdef SUSPEND_USES_PMU
- pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
- spin_unlock_irqrestore(&pmu_lock, flags);
- while(!req.complete)
- pmu_poll();
-#else /* SUSPEND_USES_PMU */
if (gpio_irq >= 0)
enable_irq(gpio_irq);
out_8(&via[IER], CB1_INT | IER_SET);
spin_unlock_irqrestore(&pmu_lock, flags);
pmu_poll();
-#endif /* SUSPEND_USES_PMU */
}
/* Interrupt data could be the result data from an ADB cmd */
@@ -1743,14 +1725,10 @@ pmu_present(void)
* PCI devices which may get powered off when we sleep.
*/
static struct pci_save {
-#ifndef HACKED_PCI_SAVE
u16 command;
u16 cache_lat;
u16 intr;
u32 rom_address;
-#else
- u32 config[16];
-#endif
} *pbook_pci_saves;
static int pbook_npci_saves;
@@ -1796,16 +1774,10 @@ pbook_pci_save(void)
pci_dev_put(pd);
return;
}
-#ifndef HACKED_PCI_SAVE
pci_read_config_word(pd, PCI_COMMAND, &ps->command);
pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
pci_read_config_dword(pd, PCI_ROM_ADDRESS, &ps->rom_address);
-#else
- int i;
- for (i=1;i<16;i++)
- pci_read_config_dword(pd, i<<4, &ps->config[i]);
-#endif
++ps;
}
}
@@ -1824,17 +1796,6 @@ pbook_pci_restore(void)
int j;
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
-#ifdef HACKED_PCI_SAVE
- int i;
- if (npci-- == 0) {
- pci_dev_put(pd);
- return;
- }
- ps++;
- for (i=2;i<16;i++)
- pci_write_config_dword(pd, i<<4, ps->config[i]);
- pci_write_config_dword(pd, 4, ps->config[1]);
-#else
if (npci-- == 0)
return;
ps++;
@@ -1858,7 +1819,6 @@ pbook_pci_restore(void)
pci_write_config_word(pd, PCI_COMMAND, ps->command);
break;
}
-#endif
}
}
^ permalink raw reply
* [PATCH] powerpc: fix powersave-nap sysctl registration
From: Johannes Berg @ 2007-11-07 19:11 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Eric W. Biederman, linuxppc-dev list
The sysctl check code complains about a writable directory,
fix it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Eric W. Biederman <ebiederm@xmission.com>
---
arch/powerpc/kernel/idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- everything.orig/arch/powerpc/kernel/idle.c 2007-11-07 19:54:56.787884927 +0100
+++ everything/arch/powerpc/kernel/idle.c 2007-11-07 20:00:27.965924749 +0100
@@ -122,7 +122,7 @@ static ctl_table powersave_nap_sysctl_ro
{
.ctl_name = CTL_KERN,
.procname = "kernel",
- .mode = 0755,
+ .mode = 0555,
.child = powersave_nap_ctl_table,
},
{}
^ permalink raw reply
* Re: [PATCH 4/4] Kill flatdevtree.c
From: Jon Loeliger @ 2007-11-08 14:27 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20071108033603.B6377DDE0E@ozlabs.org>
David Gibson wrote:
> Now that earlier patches have switched the bootwrapper to using libfdt
> for device tree manipulation, this patch removes the now unused
> flatdevtree.c and related files.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>
> ---
> arch/powerpc/boot/Makefile | 2
> arch/powerpc/boot/flatdevtree.c | 1036 -----------------------------------
> arch/powerpc/boot/flatdevtree.h | 113 ---
> arch/powerpc/boot/flatdevtree_misc.c | 79 --
> arch/powerpc/boot/main.c | 1
> arch/powerpc/boot/ops.h | 1
> 6 files changed, 1 insertion(+), 1231 deletions(-)
This sort of patch really appears a lot cleaner and nicer
using git and the -M flag to simply state which files
are removed outright.
*sigh*
jdl
^ permalink raw reply
* Re: [PATCH 0/5] fixups for mpc8360 rev. 2.1 erratum #2 (RGMII Timing)
From: Anton Vorontsov @ 2007-11-08 14:16 UTC (permalink / raw)
To: Kim Phillips; +Cc: netdev, linuxppc-dev, paulus, Li Yang, jgarzik
In-Reply-To: <20071105121530.5c38fbb7.kim.phillips@freescale.com>
On Mon, Nov 05, 2007 at 12:15:30PM -0600, Kim Phillips wrote:
> Hello all,
>
> the following patches fix RGMII timing for rev. 2.1 of the mpc8360,
> according to erratum #2 (erratum text included below). Basically the
> most intrusive part is the addition of two new RGMII Internal Delay
> modes; one for TX delay only, and the other for RX delay only (i.e, not
> both at the same time).
>
> Please review, and since this affects both netdev and powerpc trees,
> one maintainer should ack them for the other to push upstream (i.e,
> Kumar acks them, and Leo picks them up to go through netdev or the
> other way around; either way is fine with me). I'm hoping they're
> trivial enough to go in 2.6.24.
>
> Depending on how the review goes, a follow-on patch to u-boot will be
> sent out that fixes up the phy-connection-type in the device tree (from
> "rgmii-id" to "rgmii-rxid" iff on mpc8360rev2.1).
I've upgraded CPU to rev2.1, board rev0.3.
Applied 5/5 patches onto paulus/powerpc.git at e403149c92a. Here is
the results:
If I use -rxid, then geth not able to transmit anything.
With -txid geth not able to receive anything.
With just -id everything works fine though...
Maybe there should be another condition, in addition to cpu rev2.1?
> Thanks,
>
> Kim
>
> mpc8360 rev 2.1 erratum #2:
> -----------
> Recommended AC timings for chip 8360Rev2.1 UCC ETH RGMII when working
> with Rev Pilot MDS for proper RGMII operation:
>
> IMMR_BASE + 0x14A8[4:5] = 11 (clk delay for UCC 2)
> IMMR_BASE + 0x14A8[18:19] = 11 (clk delay for UCC 1)
> IMMR_BASE + 0x14AC[20:27] = 10101010 (data delay for both UCC's)
>
> The Phy (Marvell 88e1111) should be configured NOT to work with RGMII
> delay for TxD.
Thanks,
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH] DTC: Polish up the DTS Version 1 implementation.
From: Jon Loeliger @ 2007-11-08 14:13 UTC (permalink / raw)
To: Jon Loeliger, linuxppc-dev
In-Reply-To: <20071107231942.GA8835@localhost.localdomain>
David Gibson wrote:
>
> Yes, I know, but I don't think it's even worth having the unused
> internal parameterization.
OK. We can eliminate it then; no problem.
>
>> I ran my "old versus new DTC" comparison script and found it. :-)
>
> Heh, we should fold that into the testsuite, too.
I'll start by simply adding the script to the test directory then.
>> Because it wasn't working, as explained in the comment I added.
>> Specifically, (1<<bits), with bits==64 overflowed and yielded
>> the value 0.
>
> Ah...
>
> Well, I assumed (1ULL << 64) would equal 0, which is why the
> comparison has the (-1) - I was expecting for bits == 64 it would end
> up being against -1, i.e. 0xffffffffffffffff. This appears to work on
> the systems I've been using.
But not on an x86 system.
> But I just remembered that (x << n) has undefined behaviour in C when
> n >= word size.
Exactly. In fact, I think x86 takes the shift value, bit-wise
ANDs it with 63 internally, and then shifts left by that value.
So I guess (1 << 64) is just returning garbage - I
In fact, it is yielding 1 on an x86 machine.
> suspect I didn't catch it because I've been building with -O0 for
> gdb-ability, which might change the behaviour of corner cases like
> that.
Or works on a PPC machine? :-)
> So I guess we need
> else if ((errno == ERANGE)
> || ((bits < 64) && (val >= (1ULL << bits))))
Sounds good. I'll commit --amend that into the patch!
>> And in the blue corner, touting consistent hex forms, ...
>
> And in the red, compact bytestring representations.
> No, seriously, the inconsistency bothers me too. But so does the fact
> that using 0x in the bytestring would double the minimum size for
> representing bytestrings, somewhat changing the flavour of [] as well
> (because spaces are no longer optional). I'm looking for a killer
> argument one way or the other, but I haven't found it yet.
But why does it even have to be hex numbers at all?
I guess my point is that they could just be expressions.
You could use 0x31 or 49 or '1' or 061, whichever made
more sense in some application. You don't necessarily take
a representational size hit.
jdl
^ permalink raw reply
* Re: [PATCH] ioremap/iounmap issue in yucca_setup_pcie_fpga_rootpoint(); arch/ppc/platforms/4xx/yucca.c
From: Josh Boyer @ 2007-11-08 14:09 UTC (permalink / raw)
To: Roel Kluin; +Cc: linuxppc-dev
In-Reply-To: <47323AB8.3060804@tiscali.nl>
On Wed, 07 Nov 2007 23:22:48 +0100
Roel Kluin <12o3l@tiscali.nl> wrote:
> iounmap pcie_reg_fpga_base in default case
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Looks good, thanks.
josh
> ---
> diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
> index a83b0ba..66a44ff 100644
> --- a/arch/ppc/platforms/4xx/yucca.c
> +++ b/arch/ppc/platforms/4xx/yucca.c
> @@ -211,6 +211,7 @@ static void __init yucca_setup_pcie_fpga_rootpoint(int port)
> break;
>
> default:
> + iounmap(pcie_reg_fpga_base);
> return;
> }
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH] another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c
From: Josh Boyer @ 2007-11-08 14:08 UTC (permalink / raw)
To: Roel Kluin; +Cc: linuxppc-dev
In-Reply-To: <473238C2.9050402@tiscali.nl>
On Wed, 07 Nov 2007 23:14:26 +0100
Roel Kluin <12o3l@tiscali.nl> wrote:
> not yet tested
> --
> iounmap kb_data on error
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
> index 8689f3e..c4ac63d 100644
> --- a/arch/ppc/platforms/4xx/sycamore.c
> +++ b/arch/ppc/platforms/4xx/sycamore.c
> @@ -99,22 +99,23 @@ sycamore_setup_arch(void)
> kb_data = ioremap(SYCAMORE_PS2_BASE, 8);
> if (!kb_data) {
> printk(KERN_CRIT
> "sycamore_setup_arch() kb_data ioremap failed\n");
> return;
> }
>
> kb_cs = kb_data + 1;
>
> fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
> if (!fpga_status) {
> + iounmap(kb_data);
> printk(KERN_CRIT
> "sycamore_setup_arch() fpga_status ioremap failed\n");
> return;
> }
Same comment as the walnut patch. You can probably fold these two
patches into one.
josh
^ permalink raw reply
* Re: [PATCH] very similar, now in walnut_setup_arch(); arch/ppc/platforms/4xx/walnut.c
From: Josh Boyer @ 2007-11-08 14:06 UTC (permalink / raw)
To: Roel Kluin; +Cc: linuxppc-dev
In-Reply-To: <4732397A.8020607@tiscali.nl>
On Wed, 07 Nov 2007 23:17:30 +0100
Roel Kluin <12o3l@tiscali.nl> wrote:
> iounmap kb_data on error
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c
> index 2f97723..04d3f3f 100644
> --- a/arch/ppc/platforms/4xx/walnut.c
> +++ b/arch/ppc/platforms/4xx/walnut.c
> @@ -81,22 +81,23 @@ walnut_setup_arch(void)
> kb_data = ioremap(WALNUT_PS2_BASE, 8);
> if (!kb_data) {
> printk(KERN_CRIT
> "walnut_setup_arch() kb_data ioremap failed\n");
> return;
> }
>
> kb_cs = kb_data + 1;
>
> fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
> if (!fpga_status) {
> + iounmap(kb_data);
> printk(KERN_CRIT
> "walnut_setup_arch() fpga_status ioremap failed\n");
> return;
> }
kb_data and fpga_status aren't iounmapped anywhere at all in this
function. Care to fix that up in addition to the error case?
>
> fpga_enable = fpga_status + 1;
> fpga_polarity = fpga_status + 2;
> fpga_trigger = fpga_status + 3;
> fpga_brdc = fpga_status + 4;
>
> /* split the keyboard and mouse interrupts */
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: Merge dtc
From: Jon Loeliger @ 2007-11-08 13:59 UTC (permalink / raw)
To: Sam Ravnborg, Milton Miller, ppcdev, Paul Mackerras
In-Reply-To: <20071031024508.GB7772@localhost.localdomain>
David Gibson wrote:
>
> Ok. I'll use this version in my next spin; except for adding one
> dependency you missed, and removing one which should never have been
> there (unneccessary #include, which I've already fixed in dtc
> upstream).
>
I think if we embed the DTC in the kernel tree, we should
wait until it supports /dts-v1/ files first.
jdl
^ permalink raw reply
* Re: [PATCH] Register AC97 Controller Reference with the platform bus
From: Josh Boyer @ 2007-11-08 13:20 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, JOFT
In-Reply-To: <20071107161142.7901.51817.stgit@trillian.cg.shawcable.net>
On Wed, 07 Nov 2007 09:14:15 -0700
Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Joachim Foerster <mls.JOFT@gmx.de>
>
> Add AC97 platform bus registration for Xilinx Virtex platforms.
>
> Signed-off-by: Joachim Foerster <JOFT@gmx.de>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> Josh, can you please pick up this patch into your .24 queue. I know it's
> arch/ppc, but it is harmless and it is required to get the AC97 device
> driver working on Virtex boards. It's pretty much a bug fix in that regard.
Will do shortly. I have a couple other bug fix patches I need to get
out as well.
josh
>
> Cheers,
> g.
>
> arch/ppc/syslib/virtex_devices.c | 31 +++++++++++++++++++++++++++++++
> 1 files changed, 31 insertions(+), 0 deletions(-)
>
> diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
> index 96188f8..95ee313 100644
> --- a/arch/ppc/syslib/virtex_devices.c
> +++ b/arch/ppc/syslib/virtex_devices.c
> @@ -169,6 +169,29 @@
> }, \
> }
>
> +#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
> + .name = "ml403_ac97cr", \
> + .id = num, \
> + .num_resources = 3, \
> + .resource = (struct resource[]) { \
> + { \
> + .start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \
> + .end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \
> + .flags = IORESOURCE_MEM, \
> + }, \
> + { \
> + .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> + .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> + .flags = IORESOURCE_IRQ, \
> + }, \
> + { \
> + .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
> + .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
> + .flags = IORESOURCE_IRQ, \
> + }, \
> + }, \
> +}
> +
> /* UART 8250 driver platform data table */
> struct plat_serial8250_port virtex_serial_platform_data[] = {
> #if defined(XPAR_UARTNS550_0_BASEADDR)
> @@ -303,6 +326,14 @@ struct platform_device virtex_platform_devices[] = {
> #if defined(XPAR_TFT_3_BASEADDR)
> XPAR_TFT(3),
> #endif
> +
> + /* AC97 Controller Reference instances */
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR)
> + XPAR_AC97_CONTROLLER_REFERENCE(0),
> +#endif
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR)
> + XPAR_AC97_CONTROLLER_REFERENCE(1),
> +#endif
> };
>
> /* Early serial support functions */
>
^ permalink raw reply
* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Josh Boyer @ 2007-11-08 12:08 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, Stefan Roese
In-Reply-To: <1194511344.6561.0.camel@pasglop>
On Thu, 08 Nov 2007 19:42:24 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > > +static struct mii_phy_def et1011c_phy_def = {
> > > + .phy_id = 0x0282f000,
> > > + .phy_id_mask = 0x0fffff00,
> > > + .name = "ET1011C Gigabit Ethernet",
> > > + .ops = &et1011c_phy_ops
> > > +};
> > > +
> > > +
> > > +
> > > +
> > > +
> >
> > Nitpicking: Too many empty lines for my taste.
>
> Agreed, I though I had removed them, looks like I didn't. Will fix that
> before submitting.
DENX is pretty good about having Signed-off-by lines in their tree...
maybe you should add the original authors as well if it's there.
josh
^ permalink raw reply
* RE: ML405 gigabit ethernet with kernel 2.6.23
From: MingLiu @ 2007-11-08 10:32 UTC (permalink / raw)
To: kentaro, linuxppc-embedded
In-Reply-To: <4732719A.20707@triumf.ca>
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
Dear Kentaro,
> -------------------------------------------------------------> "netperf -H 192.168.1.1 -t TCP_STREAM" 110 Mbps> "netperf -H 192.168.1.1 -t UDP_STREAM" 210 Mbps> -------------------------------------------------------------
Are these results the ones with or without Jumbo-frame enabled? If no, they are quite good I think. The results from Montavista probably are the ones with Jumbo-frame enabled.
For anybody who has interest on this topic, I have recently an accepted paper which has part of the content on this. The link is http://web.it.kth.se/~mingliu/publications/co_design(icfpt07).pdf and in 6.2 section, I listed our measurement results. 300Mbps for TCP and 400Mbps for UDP, with Jumbo-frame enabled. Unfortunately I did not explain the details and detailed configurations on our case. So these results are only for your reference.
BR
Ming
_________________________________________________________________
Windows Live Spaces 中最年轻的成员!
http://miaomiaogarden2007.spaces.live.com/
[-- Attachment #2: Type: text/html, Size: 1344 bytes --]
^ permalink raw reply
* Re: [RFC] Modifying i2c-core to support alias driver names compatible with device trees
From: Andreas Schwab @ 2007-11-08 10:03 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Jean Delvare, Tjernlund, linuxppc-dev, i2c
In-Reply-To: <20071108120535.769e4d73.sfr@canb.auug.org.au>
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> On Tue, 6 Nov 2007 15:39:42 -0500 "Jon Smirl" <jonsmirl@gmail.com> wrote:
>>
>> It was requested to split this code out into a separate thread....
>>
>> This code modifies the i2c-core to support lists of alias names in the
>> chip drivers.
>> For example: .aliases = (char const
>> *[]){"ricoh,rs5c372a","ricoh,rs5c372b","ricoh,rv5c386","ricoh,rv5c387a",
>> 0},
>
> You should not need the (char const *[]) casts at all.
It's not a cast, it's a compound literal. What it does is to create an
anonymous object, the address of which is the initializer for the
aliases pointer. Note that the anonymous object is not const qualified.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Please pull powerpc.git merge branch
From: Paul Mackerras @ 2007-11-08 9:54 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do
git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge
to get a bunch of bug-fixes, documentation updates and defconfig
updates for powerpc.
Thanks,
Paul.
Documentation/powerpc/booting-without-of.txt | 275 +++++++++++++++++++++++
arch/powerpc/boot/dts/walnut.dts | 4
arch/powerpc/boot/wrapper | 43 ++--
arch/powerpc/configs/pasemi_defconfig | 308 ++++++++++++++++----------
arch/powerpc/configs/ppc64_defconfig | 247 +++++++++++++++------
arch/powerpc/kernel/cputable.c | 36 ++-
arch/powerpc/kernel/entry_32.S | 23 ++
arch/powerpc/kernel/head_64.S | 2
arch/powerpc/kernel/idle.c | 2
arch/powerpc/kernel/misc_32.S | 32 ++-
arch/powerpc/kernel/prom.c | 12 +
arch/powerpc/kernel/prom_init.c | 2
arch/powerpc/kernel/setup_64.c | 19 +-
arch/powerpc/kernel/swsusp_32.S | 2
arch/powerpc/kernel/time.c | 10 -
arch/powerpc/kernel/vmlinux.lds.S | 3
arch/powerpc/mm/40x_mmu.c | 17 +
arch/powerpc/mm/44x_mmu.c | 1
arch/powerpc/mm/fault.c | 2
arch/powerpc/mm/hash_low_64.S | 5
arch/powerpc/mm/hash_utils_64.c | 7 -
arch/powerpc/mm/mmu_decl.h | 4
arch/powerpc/mm/slb.c | 35 +++
arch/powerpc/platforms/cell/interrupt.c | 24 +-
arch/powerpc/platforms/cell/smp.c | 1
arch/powerpc/platforms/celleb/setup.c | 1
arch/powerpc/platforms/iseries/irq.h | 4
arch/powerpc/platforms/iseries/setup.c | 4
arch/powerpc/platforms/iseries/vio.c | 10 +
arch/powerpc/platforms/pseries/eeh.c | 13 +
arch/powerpc/platforms/pseries/eeh_driver.c | 18 +-
arch/powerpc/platforms/pseries/firmware.c | 1
arch/powerpc/platforms/pseries/msi.c | 6 +
arch/powerpc/sysdev/i8259.c | 1
arch/powerpc/sysdev/mv64x60_pci.c | 10 +
arch/ppc/kernel/entry.S | 23 ++
arch/ppc/kernel/misc.S | 31 ++-
arch/ppc/mm/44x_mmu.c | 1
arch/ppc/mm/4xx_mmu.c | 17 +
arch/ppc/mm/fault.c | 2
arch/ppc/mm/mmu_decl.h | 4
arch/ppc/platforms/4xx/ebony.c | 2
arch/ppc/platforms/4xx/luan.c | 7 +
arch/ppc/platforms/4xx/ocotea.c | 2
arch/ppc/platforms/4xx/taishan.c | 2
arch/ppc/syslib/i8259.c | 1
arch/ppc/syslib/m8260_setup.c | 13 +
drivers/macintosh/windfarm_core.c | 10 -
drivers/serial/uartlite.c | 10 +
include/asm-powerpc/pgtable-ppc32.h | 13 +
include/asm-powerpc/systbl.h | 2
include/asm-powerpc/time.h | 20 +-
include/asm-powerpc/tlbflush.h | 12 +
53 files changed, 996 insertions(+), 360 deletions(-)
Alexey Dobriyan (1):
[POWERPC] Fix sysctl table check failure on PowerMac
Aurelien Jarno (1):
[POWERPC] i8259: Add disable method
Benjamin Herrenschmidt (5):
[POWERPC] powerpc: Fix demotion of segments to 4K pages
[POWERPC] 4xx: Fix 4xx flush_tlb_page()
[POWERPC] 4xx: Deal with 44x virtually tagged icache
[POWERPC] Fix cache line vs. block size confusion
[POWERPC] Fix si_addr value on low level hash failures
Dale Farnsworth (1):
[POWERPC] Fix mv643xx_pci sysfs .read and .write functions
Grant Likely (5):
[POWERPC] bootwrapper: Allow wrapper script to execute verbosely
[POWERPC] bootwrapper: Bail from script if any command fails
[POWERPC] Device tree bindings for Xilinx devices
[POWERPC] Uartlite: speed up console output
[POWERPC] ppc405 Fix arithmatic rollover bug when memory size under 16M
Johannes Berg (2):
[POWERPC] windfarm: Fix windfarm thread freezer interaction
[POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
Li Zefan (1):
[POWERPC] ] Fix memset size error
Linas Vepstas (4):
[POWERPC] EEH: Clean up comments
[POWERPC] EEH: Drivers that need reset trump others
[POWERPC] EEH: Avoid crash on null device
[POWERPC] EEH: Make sure warning message is printed
Michael Ellerman (1):
[POWERPC] Read back MSI message in rtas_setup_msi_irqs() so restore works
Olof Johansson (4):
[POWERPC] Fix build break in arch/ppc/syslib/m8260_setup.c
[POWERPC] Fix CONFIG_SMP=n build break
[POWERPC] pasemi: Update defconfig
[POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
Patrick Mansfield (1):
[POWERPC] Change fallocate to match unistd.h on powerpc
Paul Mackerras (1):
[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
Roel Kluin (1):
[POWERPC] allocation fix in ppc/platforms/4xx/luan.c
Scott Wood (1):
[POWERPC] bootwrapper: Revert ps3 binary flag usage, and remove .bin suffix
Stephen Rothwell (3):
[POWERPC] iSeries_init_IRQ non-PCI tidy
[POWERPC] Fix link errors for allyesconfig
[POWERPC] iSeries: Fix ref counting in vio setup
Steven A. Falco (1):
[POWERPC] 4xx: Fix Walnut DTS interrupt property
Tony Breeds (1):
[POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
Valentine Barshak (1):
[POWERPC] 4xx: Workaround for the 440EP(x)/GR(x) processors identical PVR issue.
will schmidt (2):
[POWERPC] Include udbg.h when using udbg_printf
[POWERPC] Fix switch_slb handling of 1T ESID values
^ permalink raw reply
* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
From: Ralf Baechle @ 2007-11-08 9:48 UTC (permalink / raw)
To: Johannes Berg
Cc: Bryan Wu, linux-mips, Rafael J. Wysocki, linuxppc-dev, Paul Mundt,
linux-pm, Guennadi Liakhovetski, Russell King
In-Reply-To: <20071107135849.207149000@sipsolutions.net>
On Wed, Nov 07, 2007 at 02:58:00PM +0100, Johannes Berg wrote:
> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cheers,
Ralf
^ permalink raw reply
* RE: Bootloader & Flash
From: MingLiu @ 2007-11-08 9:43 UTC (permalink / raw)
To: schardt; +Cc: linuxppc-embedded
In-Reply-To: <4732B492.5010604@fz-juelich.de>
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
Hi,
> Could I store both, hw bitstream and kernel, in the xilinx platform> flash ? i think its not bit enough. I want to store the hw bitstream in> the platform flash as usual and the kernel in the additional flash.> I don't know how to store the kernel in the flash until know. This why I> try with the MTD devices.
You can store HW with EDK bootloader on either of the flashes. But you can only store kernel in linear flash because it is accessible through opb bus.
> I want the root-fs on flash, but this is future :) First i try to boot> the kernel
I do not have experience to set up a file system in flash memory. What I have done is to put it in the CF card or via NFS. But I guess with MTD driver's support, it will not be difficult to do that.
Good luck.
BR
Ming
_________________________________________________________________
手机也能上 MSN 聊天了,快来试试吧!
http://mobile.msn.com.cn/
[-- Attachment #2: Type: text/html, Size: 1195 bytes --]
^ permalink raw reply
* Re: [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants
From: Stefan Roese @ 2007-11-08 9:38 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071108080733.06584DDEA0@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> There are a few variants of the STACR register that affect more than
> just the "AXON" version of EMAC. Replace the current test of various
> chip models with tests for generic properties in the device-tree.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 5/6] ibm_newemac: Cleanup/Fix RGMII MDIO support detection
From: Stefan Roese @ 2007-11-08 9:24 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071108080732.0C355DDE21@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> More than just "AXON" version of EMAC RGMII supports MDIO, so replace
> the current test with a generic property in the device-tree that
> indicates such support.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
> Should we set that in Sequoia DTS ?
I suppose yes. 440EPx support MDIO over ZMII and RGMII, but Sequoia uses RGMII
so we should enable it.
I tested it with your patches and has-mdio set on Sequoia and it works (though
it also works without this property in the RGMII node).
Thanks.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 4/6] ibm_newemac: Workaround reset timeout when no link
From: Stefan Roese @ 2007-11-08 8:44 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071108080731.2E40DDDDFC@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> With some PHYs, when the link goes away, the EMAC reset fails due
> to the loss of the RX clock I believe.
>
> The old EMAC driver worked around that using some internal chip-specific
> clock force bits that are different on various 44x implementations.
>
> This is an attempt at doing it differently, by avoiding the reset when
> there is no link, but forcing loopback mode instead. It seems to work
> on my Taishan 440GX based board so far.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug
From: Stefan Roese @ 2007-11-08 8:43 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071108080730.75261DDDFB@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> When using ZMII for MDIO only (such as 440GX with RGMII for data and ZMII
> for MDIO), the ZMII code would fail to properly refcount, thus triggering a
> BUG_ON().
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Stefan Roese @ 2007-11-08 8:41 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071108080729.E09F7DDDFB@ozlabs.org>
On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> This adds support for the ET1011c PHY as found on the taishan
> board.
>
> The code comes from the kernel distributed with the board by
> AMCC and developped by DENX.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> And don't ask me about using phylib, it's in plan :-)
>
> drivers/net/ibm_newemac/phy.c | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> Index: linux-work/drivers/net/ibm_newemac/phy.c
> ===================================================================
> --- linux-work.orig/drivers/net/ibm_newemac/phy.c 2007-11-08
> 15:11:30.000000000 +1100 +++
> linux-work/drivers/net/ibm_newemac/phy.c 2007-11-08 15:11:54.000000000
> +1100 @@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy
> return 0;
> }
>
> +static int et1011c_init(struct mii_phy *phy)
> +{
> + u16 reg_short;
> +
> + reg_short = (u16)(phy_read(phy,0x16));
> + reg_short &= ~(0x7);
> + reg_short |= 0x6; /* RGMII Trace Delay*/
> + phy_write(phy, 0x16, reg_short);
> +
> + reg_short = (u16)(phy_read(phy, 0x17));
> + reg_short &= ~(0x40);
> + phy_write(phy, 0x17, reg_short);
> +
> + phy_write(phy,0x1c,0x74f0);
> + return 0;
> +}
> +
> +static struct mii_phy_ops et1011c_phy_ops = {
> + .init = et1011c_init,
> + .setup_aneg = genmii_setup_aneg,
> + .setup_forced = genmii_setup_forced,
> + .poll_link = genmii_poll_link,
> + .read_link = genmii_read_link
> +};
> +
> +static struct mii_phy_def et1011c_phy_def = {
> + .phy_id = 0x0282f000,
> + .phy_id_mask = 0x0fffff00,
> + .name = "ET1011C Gigabit Ethernet",
> + .ops = &et1011c_phy_ops
> +};
> +
> +
> +
> +
> +
Nitpicking: Too many empty lines for my taste.
Other then that:
Acked-by: Stefan Roese <sr@denx.de>
Thanks.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Benjamin Herrenschmidt @ 2007-11-08 8:42 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200711080941.46894.sr@denx.de>
> > +static struct mii_phy_def et1011c_phy_def = {
> > + .phy_id = 0x0282f000,
> > + .phy_id_mask = 0x0fffff00,
> > + .name = "ET1011C Gigabit Ethernet",
> > + .ops = &et1011c_phy_ops
> > +};
> > +
> > +
> > +
> > +
> > +
>
> Nitpicking: Too many empty lines for my taste.
Agreed, I though I had removed them, looks like I didn't. Will fix that
before submitting.
Thanks,
Ben.
^ permalink raw reply
* [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants
From: Benjamin Herrenschmidt @ 2007-11-08 8:07 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>
There are a few variants of the STACR register that affect more than
just the "AXON" version of EMAC. Replace the current test of various
chip models with tests for generic properties in the device-tree.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/boot/dts/sequoia.dts | 4 ++++
drivers/net/ibm_newemac/core.c | 23 +++++++++++++----------
drivers/net/ibm_newemac/core.h | 6 +++---
3 files changed, 20 insertions(+), 13 deletions(-)
Index: linux-work/arch/powerpc/boot/dts/sequoia.dts
===================================================================
--- linux-work.orig/arch/powerpc/boot/dts/sequoia.dts 2007-11-08 18:49:53.000000000 +1100
+++ linux-work/arch/powerpc/boot/dts/sequoia.dts 2007-11-08 18:49:59.000000000 +1100
@@ -273,6 +273,8 @@
zmii-channel = <0>;
rgmii-device = <&RGMII0>;
rgmii-channel = <0>;
+ has-inverted-stacr-oc;
+ has-new-stacr-staopc;
};
EMAC1: ethernet@ef600f00 {
@@ -301,6 +303,8 @@
zmii-channel = <1>;
rgmii-device = <&RGMII0>;
rgmii-channel = <1>;
+ has-inverted-stacr-oc;
+ has-new-stacr-staopc;
};
};
};
Index: linux-work/drivers/net/ibm_newemac/core.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.c 2007-11-08 18:49:53.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/core.c 2007-11-08 18:50:17.000000000 +1100
@@ -709,7 +709,7 @@ static int __emac_mdio_read(struct emac_
r = EMAC_STACR_BASE(dev->opb_bus_freq);
if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
r |= EMAC_STACR_OC;
- if (emac_has_feature(dev, EMAC_FTR_HAS_AXON_STACR))
+ if (emac_has_feature(dev, EMAC_FTR_HAS_NEW_STACR))
r |= EMACX_STACR_STAC_READ;
else
r |= EMAC_STACR_STAC_READ;
@@ -781,7 +781,7 @@ static void __emac_mdio_write(struct ema
r = EMAC_STACR_BASE(dev->opb_bus_freq);
if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
r |= EMAC_STACR_OC;
- if (emac_has_feature(dev, EMAC_FTR_HAS_AXON_STACR))
+ if (emac_has_feature(dev, EMAC_FTR_HAS_NEW_STACR))
r |= EMACX_STACR_STAC_WRITE;
else
r |= EMAC_STACR_STAC_WRITE;
@@ -2473,16 +2473,19 @@ static int __devinit emac_init_config(st
/* Check EMAC version */
if (of_device_is_compatible(np, "ibm,emac4"))
dev->features |= EMAC_FTR_EMAC4;
- if (of_device_is_compatible(np, "ibm,emac-axon")
- || of_device_is_compatible(np, "ibm,emac-440epx"))
- dev->features |= EMAC_FTR_HAS_AXON_STACR
- | EMAC_FTR_STACR_OC_INVERT;
- if (of_device_is_compatible(np, "ibm,emac-440spe"))
+
+ /* Fixup some feature bits based on the device tree */
+ if (of_get_property(np, "has-inverted-stacr-oc", NULL))
dev->features |= EMAC_FTR_STACR_OC_INVERT;
+ if (of_get_property(np, "has-new-stacr-staopc", NULL))
+ dev->features |= EMAC_FTR_HAS_NEW_STACR;
- /* Fixup some feature bits based on the device tree and verify
- * we have support for them compiled in
- */
+ /* CAB lacks the appropriate properties */
+ if (of_device_is_compatible(np, "ibm,emac-axon"))
+ dev->features |= EMAC_FTR_HAS_NEW_STACR |
+ EMAC_FTR_STACR_OC_INVERT;
+
+ /* Enable TAH/ZMII/RGMII features as found */
if (dev->tah_ph != 0) {
#ifdef CONFIG_IBM_NEW_EMAC_TAH
dev->features |= EMAC_FTR_HAS_TAH;
Index: linux-work/drivers/net/ibm_newemac/core.h
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.h 2007-11-08 18:49:53.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/core.h 2007-11-08 18:49:59.000000000 +1100
@@ -292,9 +292,9 @@ struct emac_instance {
*/
#define EMAC_FTR_HAS_RGMII 0x00000020
/*
- * Set if we have axon-type STACR
+ * Set if we have new type STACR with STAOPC
*/
-#define EMAC_FTR_HAS_AXON_STACR 0x00000040
+#define EMAC_FTR_HAS_NEW_STACR 0x00000040
/* Right now, we don't quite handle the always/possible masks on the
@@ -306,7 +306,7 @@ enum {
EMAC_FTRS_POSSIBLE =
#ifdef CONFIG_IBM_NEW_EMAC_EMAC4
- EMAC_FTR_EMAC4 | EMAC_FTR_HAS_AXON_STACR |
+ EMAC_FTR_EMAC4 | EMAC_FTR_HAS_NEW_STACR |
EMAC_FTR_STACR_OC_INVERT |
#endif
#ifdef CONFIG_IBM_NEW_EMAC_TAH
^ 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