Skip to content

Commit

Permalink
[POWERPC] 85xx: Enable DMA engine on the MPC8544 DS
Browse files Browse the repository at this point in the history
Add the device tree node for the DMA engine on 8544, publish
the device and enable the driver in the defconfig.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Sebastian Siewior authored and Kumar Gala committed Apr 17, 2008
1 parent 370131c commit 1028d4f
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
41 changes: 41 additions & 0 deletions arch/powerpc/boot/dts/mpc8544ds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,47 @@
};
};

dma@21300 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc8544-dma", "fsl,eloplus-dma";
reg = <21300 4>;
ranges = <0 21100 200>;
cell-index = <0>;
dma-channel@0 {
compatible = "fsl,mpc8544-dma-channel",
"fsl,eloplus-dma-channel";
reg = <0 80>;
cell-index = <0>;
interrupt-parent = <&mpic>;
interrupts = <14 2>;
};
dma-channel@80 {
compatible = "fsl,mpc8544-dma-channel",
"fsl,eloplus-dma-channel";
reg = <80 80>;
cell-index = <1>;
interrupt-parent = <&mpic>;
interrupts = <15 2>;
};
dma-channel@100 {
compatible = "fsl,mpc8544-dma-channel",
"fsl,eloplus-dma-channel";
reg = <100 80>;
cell-index = <2>;
interrupt-parent = <&mpic>;
interrupts = <16 2>;
};
dma-channel@180 {
compatible = "fsl,mpc8544-dma-channel",
"fsl,eloplus-dma-channel";
reg = <180 80>;
cell-index = <3>;
interrupt-parent = <&mpic>;
interrupts = <17 2>;
};
};

enet0: ethernet@24000 {
cell-index = <0>;
device_type = "network";
Expand Down
17 changes: 16 additions & 1 deletion arch/powerpc/configs/85xx/mpc8544_ds_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ CONFIG_MPC85xx=y
# CONFIG_MPC85xx_CDS is not set
# CONFIG_MPC85xx_MDS is not set
CONFIG_MPC85xx_DS=y
# CONFIG_KSI8560 is not set
# CONFIG_STX_GP3 is not set
# CONFIG_TQM8540 is not set
# CONFIG_TQM8541 is not set
Expand Down Expand Up @@ -202,6 +203,7 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_MATH_EMULATION=y
# CONFIG_IOMMU_HELPER is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
Expand Down Expand Up @@ -1255,7 +1257,19 @@ CONFIG_RTC_DRV_CMOS=y
#
# on-CPU RTC drivers
#
# CONFIG_DMADEVICES is not set
CONFIG_DMADEVICES=y

#
# DMA Devices
#
CONFIG_FSL_DMA=y
# CONFIG_FSL_DMA_SELFTEST is not set
CONFIG_DMA_ENGINE=y

#
# DMA Clients
#
# CONFIG_NET_DMA is not set

#
# Userspace I/O
Expand Down Expand Up @@ -1447,6 +1461,7 @@ CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_HAVE_LMB=y

#
# Kernel hacking
Expand Down
13 changes: 13 additions & 0 deletions arch/powerpc/platforms/85xx/mpc85xx_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/interrupt.h>
#include <linux/of_platform.h>

#include <asm/system.h>
#include <asm/time.h>
Expand Down Expand Up @@ -183,6 +184,18 @@ static int __init mpc8544_ds_probe(void)
}
}

static struct of_device_id mpc85xxds_ids[] = {
{ .type = "soc", },
{ .compatible = "soc", },
{},
};

static int __init mpc85xxds_publish_devices(void)
{
return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL);
}
machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);

/*
* Called very early, device-tree isn't unflattened
*/
Expand Down

0 comments on commit 1028d4f

Please sign in to comment.