* [PATCH] powerpc: Fix platinumfb framebuffer
From: Benjamin Herrenschmidt @ 2007-09-19 4:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list, Linux Fbdev development list
powerpc: Fix platinumfb resource handling
Current kernels have a non-working platinumfb due to some resource
management issues. This fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Note: platinumfb is a powermac only driver
Index: linux-work/drivers/video/platinumfb.c
===================================================================
--- linux-work.orig/drivers/video/platinumfb.c 2007-09-19 14:21:42.000000000 +1000
+++ linux-work/drivers/video/platinumfb.c 2007-09-19 14:47:11.000000000 +1000
@@ -17,6 +17,8 @@
* more details.
*/
+#undef DEBUG
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -535,33 +537,35 @@ static int __devinit platinumfb_probe(st
volatile __u8 *fbuffer;
int bank0, bank1, bank2, bank3, rc;
- printk(KERN_INFO "platinumfb: Found Apple Platinum video hardware\n");
+ dev_info(&odev->dev, "Found Apple Platinum video hardware\n");
info = framebuffer_alloc(sizeof(*pinfo), &odev->dev);
- if (info == NULL)
+ if (info == NULL) {
+ dev_err(&odev->dev, "Failed to allocate fbdev !\n");
return -ENOMEM;
+ }
pinfo = info->par;
if (of_address_to_resource(dp, 0, &pinfo->rsrc_reg) ||
of_address_to_resource(dp, 1, &pinfo->rsrc_fb)) {
- printk(KERN_ERR "platinumfb: Can't get resources\n");
- framebuffer_release(info);
- return -ENXIO;
- }
- if (!request_mem_region(pinfo->rsrc_reg.start,
- pinfo->rsrc_reg.start -
- pinfo->rsrc_reg.end + 1,
- "platinumfb registers")) {
+ dev_err(&odev->dev, "Can't get resources\n");
framebuffer_release(info);
return -ENXIO;
}
+ dev_dbg(&odev->dev, " registers : 0x%llx...0x%llx\n",
+ (unsigned long long)pinfo->rsrc_reg.start,
+ (unsigned long long)pinfo->rsrc_reg.end);
+ dev_dbg(&odev->dev, " framebuffer: 0x%llx...0x%llx\n",
+ (unsigned long long)pinfo->rsrc_fb.start,
+ (unsigned long long)pinfo->rsrc_fb.end);
+
+ /* Do not try to request register space, they overlap with the
+ * northbridge and that can fail. Only request framebuffer
+ */
if (!request_mem_region(pinfo->rsrc_fb.start,
- pinfo->rsrc_fb.start
- - pinfo->rsrc_fb.end + 1,
+ pinfo->rsrc_fb.end - pinfo->rsrc_fb.start + 1,
"platinumfb framebuffer")) {
- release_mem_region(pinfo->rsrc_reg.start,
- pinfo->rsrc_reg.end -
- pinfo->rsrc_reg.start + 1);
+ printk(KERN_ERR "platinumfb: Can't request framebuffer !\n");
framebuffer_release(info);
return -ENXIO;
}
@@ -600,7 +604,8 @@ static int __devinit platinumfb_probe(st
bank2 = fbuffer[0x200000] == 0x56;
bank3 = fbuffer[0x300000] == 0x78;
pinfo->total_vram = (bank0 + bank1 + bank2 + bank3) * 0x100000;
- printk(KERN_INFO "platinumfb: Total VRAM = %dMB (%d%d%d%d)\n", (int) (pinfo->total_vram / 1024 / 1024),
+ printk(KERN_INFO "platinumfb: Total VRAM = %dMB (%d%d%d%d)\n",
+ (unsigned int) (pinfo->total_vram / 1024 / 1024),
bank3, bank2, bank1, bank0);
/*
@@ -644,16 +649,15 @@ static int __devexit platinumfb_remove(s
unregister_framebuffer (info);
/* Unmap frame buffer and registers */
+ iounmap(pinfo->frame_buffer);
+ iounmap(pinfo->platinum_regs);
+ iounmap(pinfo->cmap_regs);
+
release_mem_region(pinfo->rsrc_fb.start,
pinfo->rsrc_fb.end -
pinfo->rsrc_fb.start + 1);
- release_mem_region(pinfo->rsrc_reg.start,
- pinfo->rsrc_reg.end -
- pinfo->rsrc_reg.start + 1);
- iounmap(pinfo->frame_buffer);
- iounmap(pinfo->platinum_regs);
+
release_mem_region(pinfo->cmap_regs_phys, 0x1000);
- iounmap(pinfo->cmap_regs);
framebuffer_release(info);
^ permalink raw reply
* Re: [PATCH] [POWERPC] Fix build errors when BLOCK=n
From: Paul Mackerras @ 2007-09-19 4:49 UTC (permalink / raw)
To: Emil Medve; +Cc: linuxppc-dev, kumar.gala, bzolnier, linux-ide
In-Reply-To: <11900663131073-git-send-email-Emilian.Medve@Freescale.com>
Emil Medve writes:
> The fix tries to use the smallest scope CONFIG_* symbols that will fix the build
> problem. In this case <linux/ide.h> needs to be included only if IDE=y or
> IDE=m were selected. Also, ppc_ide_md is needed only if BLK_DEV_IDE=y or
> BLK_DEV_IDE=m
It would be nicer to remove the ppc_ide_md stuff from ppc_ksyms.c
altogether and just put the EXPORT_SYMBOL in setup_32.c.
Paul.
^ permalink raw reply
* Re: [PATCH 13/28] 8xx: Infrastructure code cleanup.
From: David Gibson @ 2007-09-19 4:25 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165742.GM6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:42AM -0500, Scott Wood wrote:
> 1. Keep a global mpc8xx_immr mapping, rather than constantly
> creating temporary mappings.
Nice, but again, it seems a bit pointless to leave in all the
immr_map() / immr_unmap() pairs now that they do basically nothing.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH 2/2] powerpc: Fix timekeeping on PowerPC 601
From: Benjamin Herrenschmidt @ 2007-09-19 4:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Recent changes to the timekeeping code broke support for the PowerPC 601
processor which doesn't have the usual timebase facility but a slightly
different thing called (yuck) the RTC.
This fixes it, boot tested on an old 601 based PowerMac 7200
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/time.c | 8 +++++---
include/asm-powerpc/time.h | 5 +++++
2 files changed, 10 insertions(+), 3 deletions(-)
Index: linux-work/arch/powerpc/kernel/time.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/time.c 2007-09-19 10:53:28.000000000 +1000
+++ linux-work/arch/powerpc/kernel/time.c 2007-09-19 11:28:14.000000000 +1000
@@ -239,7 +239,7 @@ static void snapshot_tb_and_purr(void *d
struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
local_irq_save(flags);
- p->tb = mftb();
+ p->tb = get_tb_or_rtc();
p->purr = mfspr(SPRN_PURR);
wmb();
p->initialized = 1;
@@ -317,7 +317,7 @@ static void snapshot_purr(void)
*/
void snapshot_timebase(void)
{
- __get_cpu_var(last_jiffy) = get_tb();
+ __get_cpu_var(last_jiffy) = get_tb_or_rtc();
snapshot_purr();
}
@@ -684,6 +684,8 @@ void timer_interrupt(struct pt_regs * re
write_seqlock(&xtime_lock);
tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy;
+ if (__USE_RTC() && tb_next_jiffy >= 1000000000)
+ tb_next_jiffy -= 1000000000;
if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) {
tb_last_jiffy = tb_next_jiffy;
do_timer(1);
@@ -977,7 +979,7 @@ void __init time_init(void)
tb_to_ns_scale = scale;
tb_to_ns_shift = shift;
/* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
- boot_tb = get_tb();
+ boot_tb = get_tb_or_rtc();
tm = get_boot_time();
Index: linux-work/include/asm-powerpc/time.h
===================================================================
--- linux-work.orig/include/asm-powerpc/time.h 2007-09-19 10:53:28.000000000 +1000
+++ linux-work/include/asm-powerpc/time.h 2007-09-19 10:53:37.000000000 +1000
@@ -149,6 +149,11 @@ static inline u64 get_tb(void)
}
#endif /* !CONFIG_PPC64 */
+static inline u64 get_tb_or_rtc(void)
+{
+ return __USE_RTC() ? get_rtc() : get_tb();
+}
+
static inline void set_tb(unsigned int upper, unsigned int lower)
{
mtspr(SPRN_TBWL, 0);
^ permalink raw reply
* [PATCH 1/2] powerpc: Don't expose clock vDSO functions when CPU has no timebase
From: Benjamin Herrenschmidt @ 2007-09-19 4:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
We forgot to remove the clock_gettime, clock_getres and get_tbfreq vDSO
calls on CPUs that have no timebase such as 601 or 403 (old CPUs that have
different mechanisms and for which the vDSO code will not work properly).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/vdso.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: linux-work/arch/powerpc/kernel/vdso.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/vdso.c 2007-09-18 16:54:37.000000000 +1000
+++ linux-work/arch/powerpc/kernel/vdso.c 2007-09-18 16:55:11.000000000 +1000
@@ -98,6 +98,18 @@ static struct vdso_patch_def vdso_patche
CPU_FTR_USE_TB, 0,
"__kernel_gettimeofday", NULL
},
+ {
+ CPU_FTR_USE_TB, 0,
+ "__kernel_clock_gettime", NULL
+ },
+ {
+ CPU_FTR_USE_TB, 0,
+ "__kernel_clock_getres", NULL
+ },
+ {
+ CPU_FTR_USE_TB, 0,
+ "__kernel_get_tbfreq", NULL
+ },
};
/*
^ permalink raw reply
* Cleanups for physmap_of.c
From: David Gibson @ 2007-09-19 4:16 UTC (permalink / raw)
To: Vitaly Wool, Paul Mackerras; +Cc: linuxppc-dev
This patch includes a whole batch of smallish cleanups for
drivers/mtd/physmap_of.c.
- A bunch of uneeded #includes are removed
- We switch to the modern linux/of.h etc. in place of
asm/prom.h
- Use some helper macros to avoid some ugly inline #ifdefs
- A few lines of unreachable code are removed
- A number of indentation / line-wrapping fixes
- More consistent use of kernel idioms such as if (!p) instead
of if (p == NULL)
- Clarify some printk()s and other informative strings.
- (the big one) Despite the name, this driver really has
nothing to do with drivers/mtd/physmap.c. The fact that the flash
chips must be physically direct mapped is a constrant, but doesn't
really say anything about the actual purpose of this driver, which is
to instantiate MTD devices based on information from the device tree.
Therefore the physmap name is replaced everywhere within the file with
"of_flash". The file itself and the Kconfig option is not renamed for
now (so that the diff is actually a diff). That can come later.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: working-2.6/drivers/mtd/maps/physmap_of.c
===================================================================
--- working-2.6.orig/drivers/mtd/maps/physmap_of.c 2007-09-14 14:24:06.000000000 +1000
+++ working-2.6/drivers/mtd/maps/physmap_of.c 2007-09-19 13:59:23.000000000 +1000
@@ -1,5 +1,5 @@
/*
- * Normal mappings of chips in physical memory for OF devices
+ * Flash mappings described by the OF (or flattened) device tree
*
* Copyright (C) 2006 MontaVista Software Inc.
* Author: Vitaly Wool <vwool@ru.mvista.com>
@@ -15,20 +15,15 @@
#include <linux/module.h>
#include <linux/types.h>
-#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/slab.h>
#include <linux/device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
-struct physmap_flash_info {
+struct of_flash {
struct mtd_info *mtd;
struct map_info map;
struct resource *res;
@@ -38,8 +33,10 @@ struct physmap_flash_info {
};
#ifdef CONFIG_MTD_PARTITIONS
+#define OF_FLASH_PARTS(info) ((info)->parts)
+
static int parse_obsolete_partitions(struct of_device *dev,
- struct physmap_flash_info *info,
+ struct of_flash *info,
struct device_node *dp)
{
int i, plen, nr_parts;
@@ -56,11 +53,9 @@ static int parse_obsolete_partitions(str
nr_parts = plen / sizeof(part[0]);
- info->parts = kzalloc(nr_parts * sizeof(struct mtd_partition), GFP_KERNEL);
- if (!info->parts) {
- printk(KERN_ERR "Can't allocate the flash partition data!\n");
+ info->parts = kzalloc(nr_parts * sizeof(*info->parts), GFP_KERNEL);
+ if (!info->parts)
return -ENOMEM;
- }
names = of_get_property(dp, "partition-names", &plen);
@@ -86,8 +81,8 @@ static int parse_obsolete_partitions(str
return nr_parts;
}
-static int __devinit process_partitions(struct physmap_flash_info *info,
- struct of_device *dev)
+static int __devinit parse_partitions(struct of_flash *info,
+ struct of_device *dev)
{
const char *partname;
static const char *part_probe_types[]
@@ -109,87 +104,68 @@ static int __devinit process_partitions(
for (pp = dp->child; pp; pp = pp->sibling)
nr_parts++;
- if (nr_parts) {
- info->parts = kzalloc(nr_parts * sizeof(struct mtd_partition),
- GFP_KERNEL);
- if (!info->parts) {
- printk(KERN_ERR "Can't allocate the flash partition data!\n");
- return -ENOMEM;
- }
+ if (nr_parts == 0)
+ return parse_obsolete_partitions(dev, info, dp);
- for (pp = dp->child, i = 0 ; pp; pp = pp->sibling, i++) {
- const u32 *reg;
- int len;
-
- reg = of_get_property(pp, "reg", &len);
- if (!reg || (len != 2*sizeof(u32))) {
- dev_err(&dev->dev, "Invalid 'reg' on %s\n",
- dp->full_name);
- kfree(info->parts);
- info->parts = NULL;
- return -EINVAL;
- }
- info->parts[i].offset = reg[0];
- info->parts[i].size = reg[1];
-
- partname = of_get_property(pp, "label", &len);
- if (!partname)
- partname = of_get_property(pp, "name", &len);
- info->parts[i].name = (char *)partname;
+ info->parts = kzalloc(nr_parts * sizeof(*info->parts),
+ GFP_KERNEL);
+ if (!info->parts)
+ return -ENOMEM;
- if (of_get_property(pp, "read-only", &len))
- info->parts[i].mask_flags = MTD_WRITEABLE;
+ for (pp = dp->child, i = 0; pp; pp = pp->sibling, i++) {
+ const u32 *reg;
+ int len;
+
+ reg = of_get_property(pp, "reg", &len);
+ if (!reg || (len != 2*sizeof(u32))) {
+ dev_err(&dev->dev, "Invalid 'reg' on %s\n",
+ dp->full_name);
+ kfree(info->parts);
+ info->parts = NULL;
+ return -EINVAL;
}
- } else {
- nr_parts = parse_obsolete_partitions(dev, info, dp);
- }
+ info->parts[i].offset = reg[0];
+ info->parts[i].size = reg[1];
- if (nr_parts < 0)
- return nr_parts;
+ partname = of_get_property(pp, "label", &len);
+ if (!partname)
+ partname = of_get_property(pp, "name", &len);
+ info->parts[i].name = (char *)partname;
- if (nr_parts > 0)
- add_mtd_partitions(info->mtd, info->parts, nr_parts);
- else
- add_mtd_device(info->mtd);
+ if (of_get_property(pp, "read-only", &len))
+ info->parts[i].mask_flags = MTD_WRITEABLE;
+ }
- return 0;
+ return nr_parts;
}
#else /* MTD_PARTITIONS */
-static int __devinit process_partitions(struct physmap_flash_info *info,
- struct device_node *dev)
-{
- add_mtd_device(info->mtd);
- return 0;
-}
+#define OF_FLASH_PARTS(info) (0)
+#define parse_partitions(info, dev) (0)
#endif /* MTD_PARTITIONS */
-static int of_physmap_remove(struct of_device *dev)
+static int of_flash_remove(struct of_device *dev)
{
- struct physmap_flash_info *info;
+ struct of_flash *info;
info = dev_get_drvdata(&dev->dev);
- if (info == NULL)
+ if (!info)
return 0;
dev_set_drvdata(&dev->dev, NULL);
- if (info->mtd != NULL) {
-#ifdef CONFIG_MTD_PARTITIONS
- if (info->parts) {
+ if (info->mtd) {
+ if (OF_FLASH_PARTS(info)) {
del_mtd_partitions(info->mtd);
- kfree(info->parts);
+ kfree(OF_FLASH_PARTS(info));
} else {
del_mtd_device(info->mtd);
}
-#else
- del_mtd_device(info->mtd);
-#endif
map_destroy(info->mtd);
}
- if (info->map.virt != NULL)
+ if (info->map.virt)
iounmap(info->map.virt);
- if (info->res != NULL) {
+ if (info->res) {
release_resource(info->res);
kfree(info->res);
}
@@ -227,52 +203,49 @@ static struct mtd_info * __devinit obsol
return do_map_probe("jedec_probe", map);
} else {
if (strcmp(of_probe, "ROM") != 0)
- dev_dbg(&dev->dev, "obsolete_probe: don't know probe type "
- "'%s', mapping as rom\n", of_probe);
+ dev_warn(&dev->dev, "obsolete_probe: don't know probe "
+ "type '%s', mapping as rom\n", of_probe);
return do_map_probe("mtd_rom", map);
}
}
-static int __devinit of_physmap_probe(struct of_device *dev, const struct of_device_id *match)
+static int __devinit of_flash_probe(struct of_device *dev,
+ const struct of_device_id *match)
{
struct device_node *dp = dev->node;
struct resource res;
- struct physmap_flash_info *info;
- const char *probe_type = (const char *)match->data;
+ struct of_flash *info;
+ const char *probe_type = match->data;
const u32 *width;
int err;
+ err = -ENXIO;
if (of_address_to_resource(dp, 0, &res)) {
- dev_err(&dev->dev, "Can't get the flash mapping!\n");
- err = -EINVAL;
+ dev_err(&dev->dev, "Can't get IO address from device tree\n");
goto err_out;
}
- dev_dbg(&dev->dev, "physmap flash device: %.8llx at %.8llx\n",
- (unsigned long long)res.end - res.start + 1,
- (unsigned long long)res.start);
-
- info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
- if (info == NULL) {
- err = -ENOMEM;
+ dev_dbg(&dev->dev, "of_flash device: %.8llx-%.8llx\n",
+ (unsigned long long)res.start, (unsigned long long)res.end);
+
+ err = -ENOMEM;
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
+ if (!info)
goto err_out;
- }
memset(info, 0, sizeof(*info));
dev_set_drvdata(&dev->dev, info);
+ err = -EBUSY;
info->res = request_mem_region(res.start, res.end - res.start + 1,
- dev->dev.bus_id);
- if (info->res == NULL) {
- dev_err(&dev->dev, "Could not reserve memory region\n");
- err = -ENOMEM;
+ dev->dev.bus_id);
+ if (!info->res)
goto err_out;
- }
+ err = -ENXIO;
width = of_get_property(dp, "bank-width", NULL);
- if (width == NULL) {
- dev_err(&dev->dev, "Can't get the flash bank width!\n");
- err = -EINVAL;
+ if (!width) {
+ dev_err(&dev->dev, "Can't get bank width from device tree\n");
goto err_out;
}
@@ -281,10 +254,10 @@ static int __devinit of_physmap_probe(st
info->map.size = res.end - res.start + 1;
info->map.bankwidth = *width;
+ err = -ENOMEM;
info->map.virt = ioremap(info->map.phys, info->map.size);
- if (info->map.virt == NULL) {
- dev_err(&dev->dev, "Failed to ioremap flash region\n");
- err = EIO;
+ if (!info->map.virt) {
+ dev_err(&dev->dev, "Failed to ioremap() flash region\n");
goto err_out;
}
@@ -295,25 +268,30 @@ static int __devinit of_physmap_probe(st
else
info->mtd = obsolete_probe(dev, &info->map);
- if (info->mtd == NULL) {
- dev_err(&dev->dev, "map_probe failed\n");
- err = -ENXIO;
+ err = -ENXIO;
+ if (!info->mtd) {
+ dev_err(&dev->dev, "do_map_probe() failed\n");
goto err_out;
}
info->mtd->owner = THIS_MODULE;
- return process_partitions(info, dev);
+ err = parse_partitions(info, dev);
+ if (err < 0)
+ goto err_out;
-err_out:
- of_physmap_remove(dev);
- return err;
+ if (err > 0)
+ add_mtd_partitions(info->mtd, OF_FLASH_PARTS(info), err);
+ else
+ add_mtd_device(info->mtd);
return 0;
-
+err_out:
+ of_flash_remove(dev);
+ return err;
}
-static struct of_device_id of_physmap_match[] = {
+static struct of_device_id of_flash_match[] = {
{
.compatible = "cfi-flash",
.data = (void *)"cfi_probe",
@@ -335,30 +313,28 @@ static struct of_device_id of_physmap_ma
},
{ },
};
+MODULE_DEVICE_TABLE(of, of_flash_match);
-MODULE_DEVICE_TABLE(of, of_physmap_match);
-
-
-static struct of_platform_driver of_physmap_flash_driver = {
- .name = "physmap-flash",
- .match_table = of_physmap_match,
- .probe = of_physmap_probe,
- .remove = of_physmap_remove,
+static struct of_platform_driver of_flash_driver = {
+ .name = "of-flash",
+ .match_table = of_flash_match,
+ .probe = of_flash_probe,
+ .remove = of_flash_remove,
};
-static int __init of_physmap_init(void)
+static int __init of_flash_init(void)
{
- return of_register_platform_driver(&of_physmap_flash_driver);
+ return of_register_platform_driver(&of_flash_driver);
}
-static void __exit of_physmap_exit(void)
+static void __exit of_flash_exit(void)
{
- of_unregister_platform_driver(&of_physmap_flash_driver);
+ of_unregister_platform_driver(&of_flash_driver);
}
-module_init(of_physmap_init);
-module_exit(of_physmap_exit);
+module_init(of_flash_init);
+module_exit(of_flash_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>");
-MODULE_DESCRIPTION("Configurable MTD map driver for OF");
+MODULE_DESCRIPTION("Device tree based MTD map driver");
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 1/3] powerpc clk.h interface for platforms
From: Paul Mackerras @ 2007-09-19 3:47 UTC (permalink / raw)
To: Domen Puncer; +Cc: David Brownell, linuxppc-dev, Sylvain Munaut
In-Reply-To: <20070806065857.GN4529@moe.telargo.com>
Domen Puncer writes:
> Paul, what do you say about this?
> Sylvain suggested it could also be integrated with define_machine
> interface.
As it stands, your patch adds the clk_* functions on all platforms.
What platforms would actually want to use them?
Paul.
^ permalink raw reply
* Re: [PATCH 08/28] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.
From: David Gibson @ 2007-09-19 3:16 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165737.GH6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:37AM -0500, Scott Wood wrote:
Needs a commit comment
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/boot/cuboot-pq2.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 07/28] bootwrapper: Add fsl_get_immr() and 8xx/pq2 clock functions.
From: David Gibson @ 2007-09-19 3:16 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165736.GG6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:36AM -0500, Scott Wood wrote:
> fsl_get_immr() uses /soc/ranges to determine the immr.
>
> mpc885_get_clock() transforms a crystal frequency into a system frequency
> according to the PLL register settings.
>
> pq2_get_clocks() does the same as the above for the PowerQUICC II,
> except that it produces several different clocks.
>
> The mpc8xx/pq2 set_clocks() functions modify common properties in
> the device tree based on the given clock data.
>
> The mpc885/pq2 fixup_clocks() functions call get_clocks(), and
> pass the results to set_clocks().
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 06/28] bootwrapper: Add PlanetCore firmware support.
From: David Gibson @ 2007-09-19 3:15 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165735.GF6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:35AM -0500, Scott Wood wrote:
> This is a library that board code can use to extract information from the
> PlanetCore configuration keys. PlanetCore is used on various boards from
> Embedded Planet.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
[snip]
> +void planetcore_set_mac_addrs(const char *table)
> +{
> + char addr[4][6];
> + u64 int_addr;
> + u32 i;
> + int j;
> + void *node;
> +
> + if (!planetcore_get_hex(table, PLANETCORE_KEY_MAC_ADDR, &int_addr))
> + return;
> +
> + for (i = 0; i < 4; i++) {
> + u64 this_dev_addr = int_addr | mac_table[i];
> +
> + for (j = 5; j >= 0; j--) {
> + addr[i][j] = this_dev_addr & 0xff;
> + this_dev_addr >>= 8;
> + }
> +
> + node = find_node_by_prop_value(NULL, "linux,network-index",
> + (void *)&i, 4);
> + if (node) {
> + printf("ENET%u: local-mac-address <-"
> + " %02x:%02x:%02x:%02x:%02x:%02x\n\r", i,
> + addr[i][0], addr[i][1], addr[i][2],
> + addr[i][3], addr[i][4], addr[i][5]);
> +
> + setprop(node, "local-mac-address", addr[i], 6);
Hrm. When I said to extract the logic of fixup_mac_addrs(), I meant
to create a new one-address version of the function in devtree.c then
use it both here and in the fixup_mac_addrs() function. Rather than
duplicating it inline here.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 05/28] bootwrapper: Support all-in-one PCI nodes in cuboot-pq2.
From: David Gibson @ 2007-09-19 3:11 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165734.GE6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:34AM -0500, Scott Wood wrote:
> Consensus was reached to put PCI nodes at the root of the tree (and not
> under /soc), but the phandle to a control node was rejected in favor of
> simply not worrying about /pci/reg overlapping /soc/ranges.
>
> This updates cuboot-82xx to not look for the phandle.
I preferred the split-node method, but as you say, this consensus has
been reached for now.
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 04/28] Add early debug console for CPM serial ports.
From: David Gibson @ 2007-09-19 3:10 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165733.GD6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:33AM -0500, Scott Wood wrote:
> This code assumes that the ports have been previously set up, with
> buffers in DPRAM.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Looks sane as far as I can see.
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] atyfb: force 29MHz xtal on G3 PowerBooks
From: Benjamin Herrenschmidt @ 2007-09-19 3:01 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20070825091358.GA12235@aepfle.de>
On Sat, 2007-08-25 at 11:13 +0200, Olaf Hering wrote:
> The atyfb does not work on my 233MHz PowerBook with Mach64 LP, when the
> kernel is booted from firmware. aty_ld_pll_ct() returns 0x22 and xtal
> remains at 14.31818. When booted from MacOS, aty_ld_pll_ct() returns 0x3c
> and xtal is changed to 29.498928.
> Google indicates that all 4 PowerBook models need the higher value.
Seems to break it on my wallstreet first gen (M64 LG)
So NAK for now until we find out a better way.
Ben.
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> --- a/drivers/video/aty/atyfb_base.c
> +++ b/drivers/video/aty/atyfb_base.c
> @@ -2411,7 +2411,7 @@ static int __devinit aty_init(struct fb_
> diff1 = -diff1;
> if (diff2 < 0)
> diff2 = -diff2;
> - if (diff2 < diff1) {
> + if (diff2 < diff1 || (M64_HAS(G3_PB_1024x768))) {
> par->ref_clk_per = 1000000000000ULL / 29498928;
> xtal = "29.498928";
> }
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: dtc: Add basic testcases for dtc
From: David Gibson @ 2007-09-19 2:48 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
In-Reply-To: <E1IXeaz-0000lF-HQ@jdl.com>
On Tue, Sep 18, 2007 at 10:02:37AM -0500, Jon Loeliger wrote:
> So, like, the other day David Gibson mumbled:
> > This patch adds a handful of simple testcases for dtc. It adds a dts
> > file which should generate the same sample tree as is used for the
> > libfdt testcases, and tests invoking dtc on this dts, plus the
> > standard batch of libfdt cases on the resulting dtb, which effectively
> > checks that the dtb is correct.
> >
> > Because the test framework assumes each testcase is an executable with
> > the right output conventions, we use a little shell script, dtc.sh, as
> > a wrapper around dtc itself. It simply invokes dtc and returns a PASS
> > or FAIL depending on whether dtc returned an error.
> >
> > It's not much, but it's a start.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>
>
> Applied.
>
> > NB: Jon, you won't be able to simply git-applymbox this and have it
> > work. You'll need to manually add execute permission to tests/dtc.sh
> > before git commiting it, since I can't encode the permissions in a
> > patch. Sorry for the inconvenience, but it didn't really seem worth
> > setting up my own git to pull from just for that.
>
> No problem. Too bad you can't just use git, though... :-)
Hrm. Perhaps I should. I've been working with patches, because it
matches how I operate with the kernel, but I guess there would be some
advantages to running my own dtc git branch.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 2/2] PowerPC: Fix Sequoia MAL0 and EMAC dts entries.
From: David Gibson @ 2007-09-19 1:05 UTC (permalink / raw)
To: Valentine Barshak; +Cc: linuxppc-dev
In-Reply-To: <20070918172913.GA31098@ru.mvista.com>
On Tue, Sep 18, 2007 at 09:29:13PM +0400, Valentine Barshak wrote:
> According to PowerPC 440EPx documentation,
> MAL0 is comprised of four channels (two transmit and two receive).
> Each channel is dedicated to one of two EMAC cores.
> This patch fixes Sequoia DTS MAL0 entry and EMAC entries,
> assigning correct channel numbers to EMACs.
Hrm.. did they change the EMAC in 440EPx to only use one MAL
tx-channel? All the older ones could use two (for no readily apparent
reason, IMO).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 2/3] usb: ehci-ppc-of dts bindings.
From: Segher Boessenkool @ 2007-09-19 0:25 UTC (permalink / raw)
To: Valentine Barshak; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <20070917130005.GA29654@ru.mvista.com>
> + l) USB EHCI controllers
> +
> + Required properties:
> + - device_type : should be "usb".
No device_type please. The published USB binding doesn't define
one on purpose.
> + - compatible : should be "ehci".
Just "ehci" isn't enough -- compare to OHCI, which is the name for
a kind of USB host controller as well as for a kind of Firewire
host controller.
Maybe "usb-ehci" is best -- can anyone think of a better name?
> + - reg : Offset and length of the register set for the device
Address and length. You also should declare here how the optional
EHCI register blocks should be encoded (the USB debug port, etc.)
> + - interrupts : <a b> where a is the interrupt number and b is a
> + field that represents an encoding of the sense and level
> + information for the interrupt.
This is incorrect; not all interrupt domains use two cells, and
not all that do have this meaning for those cells.
Instead, you should just say how many interrupts should be here,
and which is which in the EHCI standard.
> + - interrupt-parent : the phandle for the interrupt controller that
> + services interrupts for this device.
Not every EHCI node needs this; just don't mention this at all,
interrupt mapping is fully defined for all devices elsewhere
already (in the "interrupt mapping" recommended practice).
> + If device registers are implemented in big endian mode, the device
> + node should have "big-endian" property.
> + If controller implementation operates with big endian descriptors,
> + compatible should also have "ehci-be-desc"
Ah, I understand what this is about, finally.
Don't put this in "compatible"; instead, do a "big-endian-descriptors"
property similar to the "big-endian" property. That last one should
maybe be "big-endian-registers" here then, to avoid confusion.
Or make "big-endian" mean both big-endian registers *and* big-endian
descriptors.
I have no opinion which is best; it depends on what configurations
actually exist, and how popular those are.
> + ehci@e0000300 {
> + device_type = "usb";
> + compatible = "ibm,ehci-440epx", "ehci-be-desc", "ehci";
> + interrupts = <1a 4>;
> + interrupt-parent = <&UIC0>;
> + reg = <0 e0000300 ff>;
Length should be 100 here.
> + big-endian;
> + };
Segher
^ permalink raw reply
* Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances
From: Vitaly Bordug @ 2007-09-19 0:09 UTC (permalink / raw)
To: Valentine Barshak; +Cc: linuxppc-dev
In-Reply-To: <46EFE300.1090108@ru.mvista.com>
Hello Valentine,
On Tue, 18 Sep 2007 18:38:56 +0400
Valentine Barshak wrote:
> Well, thanks for the invitation :)
> I've been trying to work on the pci support here too. But I've used a
> bit different approach. I tried to add 64-bit phys addr support to
> pci_32.c. The patch seems to work on Sequoia. Actually, I thought
> merging was too risky at this point and might cause more problems
> breaking both 64 and 32-bit pci support.
In order not to break, we just need same functionality and it is not that complex.
I began with the upper approach as well, but that seems more like a workaround, than a step forward.
--
Sincerely, Vitaly
^ permalink raw reply
* Re: [PATCH 01/28] CPM: Change from fsl, brg-frequency to brg/clock-frequency
From: David Gibson @ 2007-09-18 23:48 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070918142150.GA441@ld0162-tx32.am.freescale.net>
On Tue, Sep 18, 2007 at 09:21:50AM -0500, Scott Wood wrote:
> On Tue, Sep 18, 2007 at 04:11:41PM +1000, David Gibson wrote:
> > > + /* Legacy device binding -- will go away when no users are left. */
> > > + node = of_find_node_by_type(NULL, "cpm");
> > > + if (node) {
> > > + prop = of_get_property(node, "brg-frequency", &size);
> >
> > Shouldn't you check for "fsl,brg-frequency" here, in case of old
> > device trees?
>
> What old device trees? fsl,brg-frequency has never hit mainline; it's
> only been in Kumar's tree for a week or so.
Ah, ok. I didn't realise.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Linux based MPC855 SPI driver
From: Hesam Kohanteb @ 2007-09-18 23:45 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I urgently need to implement a Linux based SPI driver for MPC855. Can
please point me to one if exists or to a similar one MPC823.
Regards. --Hesam
--
Hesam Yehuda Kohanteb
(Netra Systems & Networking),
M/S USCA12-216 4120 Network Circle
Santa Clara, CA 95054
(W) 408-276-7329 X17329, Fax 408-276-4552
^ permalink raw reply
* Re: [PATCH 23/28] mpc82xx: Define CPU_FTR_NEED_COHERENT
From: Scott Wood @ 2007-09-18 14:55 UTC (permalink / raw)
To: Rune Torgersen; +Cc: linuxppc-dev
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B0360A803@ismail.innsys.innovsys.com>
On Tue, Sep 18, 2007 at 09:34:31AM -0500, Rune Torgersen wrote:
> > -----Original Message-----
> > From: Scott Wood
> > Sent: Monday, September 17, 2007 11:58 AM
> >
> > The 8272 (and presumably other PCI PQ2 chips) appear to have the
> > same issue as the 83xx regarding PCI streaming DMA.
> >
>
> Can you explain what this isssue is? We're using a 8280 and have had
> some PCI busmaster DMA problems, and wonder if it is related.
I'm not sure of the details, just that I get corrupted PCI DMA if I don't
set it.
BTW, if the problems you're seeing include lockups when using PCI DMA,
check out the end of the PCI initialization in
arch/powerpc/boot/cuboot-pq2.c; it requires certain non-default arbiter
settings.
-Scott
^ permalink raw reply
* Re: Jtag under Linux on MPC875
From: Scott Wood @ 2007-09-18 14:49 UTC (permalink / raw)
To: fabien; +Cc: linuxppc-embedded
In-Reply-To: <f8f856500709180204r165d7b9dp4a8805dbfbe84d45@mail.gmail.com>
On Tue, Sep 18, 2007 at 11:04:27AM +0200, fabien wrote:
> I'm new in embedded system and i need some informations ...
> Which tool could i use to connect my board througt the JTAG connector ?
> My board is a custom board with a MPC875, and flash is S29GL032M. The probe
> that can i use is
> a PowerPC BDM windriver Probe 2.
> I'm looking for a tool running on linux.
The Abatron BDI2000 works well with Linux.
-Scott
^ permalink raw reply
* Re: cross compiling a library with ELDK
From: Wolfgang Denk @ 2007-09-18 22:41 UTC (permalink / raw)
To: Murat Artun; +Cc: linuxppc-embedded
In-Reply-To: <4e5a3720709180602g20ccc060hbf7f091839a18c99@mail.gmail.com>
In message <4e5a3720709180602g20ccc060hbf7f091839a18c99@mail.gmail.com> you wrote:
>
> I want to cross compile a free software library with ELDK 3.1.1 for
> powerpc. I have ELDK installed under directory /opt and my system and
> PATH is set properly. I have a few points to be clarified:
May I recommend that, as a first step, you read the documentation?
> - For a cross compilation with ELDK how can we be sure that config.h
> file for a software packet is generated properly? I mean, how can we
You cannot be sure. You will always have to check.
> be sure that ELDK components is checked instead of our host linux
> system for generating a config.h file by the configure script?
RTFM. See especially the two bullets at
http://www.denx.de/wiki/view/DULG/ELDKRebuildingComponents#Section_3.7.2.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Wisdom is one of the few things that looks bigger the further away it
is. - Terry Pratchett, _Witches Abroad_
^ permalink raw reply
* Re: PSC in UART mode on TQM5200S
From: Wolfgang Denk @ 2007-09-18 22:38 UTC (permalink / raw)
To: Leopold Stotch; +Cc: linuxppc-embedded
In-Reply-To: <53b5d6e90709180313n7ef053ddqfb771f44d9bd44ef@mail.gmail.com>
In message <53b5d6e90709180313n7ef053ddqfb771f44d9bd44ef@mail.gmail.com> you wrote:
>
> So changed $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
> the following way:
Well, you have to unserstand *exactly* what the CPU and the board are
doing - the MPC5200 has multiplexed pins, and if you select one
function you lose a few others, so you must carefully check for
conflicts. Probably you will have to disable some other functions.
Also you have to usnerstand what the board is designed like - some
ports have specific and reserved functions.
Finally, there are such things like wrong baud rate on a serial port
which may make you think it's not working while you are just using bad
user mode settings.
> Is it possible to reconfigure all PSC's as UART's ?
Yes, it is. But you have to know what you are doing.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
place to shift.
^ permalink raw reply
* RE: Xilinx FX60
From: Koss, Mike (Mission Systems) @ 2007-09-18 22:13 UTC (permalink / raw)
To: Robert Woodworth; +Cc: linuxppc-embedded
In-Reply-To: <1190150070.7268.34.camel@PisteOff>
Rob,
I have working image for that board that uses the MPMC2 that I've
successfully loaded our version of linux on. It uses a hacked-together
ll_temac driver. We did a lot of integration on that board before
finally moving to the ML410 because of not being able to get the SoDIMM
port to work.
-- Mike=20
-----Original Message-----
From: Robert Woodworth [mailto:rwoodworth@securics.com]=20
Sent: Tuesday, September 18, 2007 5:15 PM
To: Grant Likely
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Xilinx FX60
On Tue, 2007-09-18 at 15:02 -0600, Grant Likely wrote:
> >
> > The only difference is that the FX60 board only has 32MB DDR, I have
> > made sure that the correct memory size is in the kernel.
>=20
> How are you booting your kernel? .ace? u-boot? load via debugger?
load via debugger (Xilinx xmd)
FYI: the board I'm using is the
TB-4V-FX60
http://www.hitechglobal.com/TED/V4PowerPC.htm
> Cheers,
> g.
>=20
^ permalink raw reply
* Re: device tree question
From: Scott Wood @ 2007-09-18 22:36 UTC (permalink / raw)
To: Alan Bennett; +Cc: linuxppc-embedded
In-Reply-To: <bfa0697f0709181521r62c81b55q65cd49d4e4ba3637@mail.gmail.com>
Alan Bennett wrote:
> I finally saw some light, though not much, and have made several
> changes to a new dts file.
>
> BTW: I've lost my __log_buf
> was 02aec04 now it's not there, nor is it Load Address: 0x00400000 + 02aec04
You can't rely on that sort of thing staying at the same address...
check System.map to see where it is now.
> BRx/ORx=CSx
> 128MB flash: CS0 = F800_0000 f800_0000
> 128MB flash: CS4 = D000_0000 f800_0000
> 128MB SDRAM: CS1 = 0000_0000 f800_0000
Below, you seem to be assuming flash is CS0 and CS3, and that CS1 is BCSR.
> / {
> model = "MPC8248";
> compatible = "fsl,mpc8248";
Model/compatible should be for the board, not the chip.
> board-control@1,0 {
> reg = <1 0 20>;
> compatible = "fsl,mpc8248-bcsr";
> };
BCSR is board-specific, not chip-specific. The compatible should
reference the specific board's name (with the board vendor replacing fsl).
> flash2@3,0 {
The unit address provides uniqueness; just do "flash@3,0".
> compatible = "jedec-flash";
Note that this should be cfi-flash if your flash is CFI-compatible.
> reg = <0 0 8000000>;
> bank-width = <1>;
> device-width = <32>;
These are specified in bytes, not bits or chips.
I'm guessing you should set them both to 4 based on the above.
> };
> dualportram@1,0 {
Should be dualportram@5,0
> reg = <5 0 100000>;
> compatible = "fsl,mpc8248-dualportram";
> };
> dualportcsr@1,0 {
Should be dualportcsr@6,0
> soc@f0000000 {
> #address-cells = <1>;
> #size-cells = <1>;
> device_type = "soc";
> compatible = "fsl,mpc8272", "fsl,pq2-soc";
The 8272 references should be 8248, though it doesn't currently matt
> serial@11a82 {
> device_type = "serial";
> compatible = "fsl,mpc8272-smc-uart",
> "fsl,cpm2-smc-uart";
> reg = <11a82 20 8300 100>;
> interrupts = <2b 8>;
> interrupt-parent = <&PIC>;
> fsl,cpm-brg = <4>;
> fsl,cpm-command = <0ce00000>;
This doesn't look right...
You'll need to update reg, interrupts, and fsl,cpm-command for whichever
SMC port you're using.
This is for SMC1 on the ep8248e:
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>;
};
Note that the 1100 in reg should be set to wherever your firmware
locates the SMC's parameter RAM block, and fsl,cpm-brg should be set to
whichever BRG your firmware and/or platform code set the SMC port to.
> mdio@10d40 {
> device_type = "mdio";
> compatible = "fsl,mpc8272ads-mdio-bitbang",
> "fsl,mpc8272-mdio-bitbang",
> "fsl,cpm2-mdio-bitbang";
> reg = <10d40 14>;
> #address-cells = <1>;
> #size-cells = <0>;
> fsl,mdio-pin = <12>;
> fsl,mdc-pin = <13>;
Does your board do mdio the same way as the mpc8272ads board? if not,
you'll have to change this.
-Scott
^ 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