Skip to content

Commit

Permalink
Merge branch 'for-2.6.24' of git://git.secretlab.ca/git/linux-2.6-mpc…
Browse files Browse the repository at this point in the history
…52xx into merge
  • Loading branch information
Paul Mackerras committed Oct 17, 2007
2 parents 5cae826 + b147d93 commit 4acadb9
Show file tree
Hide file tree
Showing 27 changed files with 2,591 additions and 7 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -699,3 +699,7 @@ source "crypto/Kconfig"
config PPC_CLOCK
bool
default n

config PPC_LIB_RHEAP
bool

18 changes: 17 additions & 1 deletion arch/powerpc/boot/dts/lite5200b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,26 @@
ethernet@3000 {
device_type = "network";
compatible = "mpc5200b-fec","mpc5200-fec";
reg = <3000 800>;
reg = <3000 400>;
mac-address = [ 02 03 04 05 06 07 ]; // Bad!
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
phy-handle = <&phy0>;
};

mdio@3000 {
#address-cells = <1>;
#size-cells = <0>;
device_type = "mdio";
compatible = "mpc5200b-fec-phy";
reg = <3000 400>; // fec range, since we need to setup fec interrupts
interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
interrupt-parent = <&mpc5200_pic>;

phy0:ethernet-phy@0 {
device_type = "ethernet-phy";
reg = <0>;
};
};

ata@3a00 {
Expand Down
5 changes: 1 addition & 4 deletions arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ endif

obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.o
obj-$(CONFIG_QUICC_ENGINE) += rheap.o
obj-$(CONFIG_XMON) += sstep.o
obj-$(CONFIG_KPROBES) += sstep.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
Expand All @@ -23,6 +22,4 @@ ifeq ($(CONFIG_PPC64),y)
obj-$(CONFIG_SMP) += locks.o
endif

# Temporary hack until we have migrated to asm-powerpc
obj-$(CONFIG_8xx) += rheap.o
obj-$(CONFIG_CPM2) += rheap.o
obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
15 changes: 15 additions & 0 deletions arch/powerpc/lib/rheap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/err.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -275,6 +276,7 @@ rh_info_t *rh_create(unsigned int alignment)

return info;
}
EXPORT_SYMBOL_GPL(rh_create);

/*
* Destroy a dynamically created remote heap. Deallocate only if the areas
Expand All @@ -288,6 +290,7 @@ void rh_destroy(rh_info_t * info)
if ((info->flags & RHIF_STATIC_INFO) == 0)
kfree(info);
}
EXPORT_SYMBOL_GPL(rh_destroy);

/*
* Initialize in place a remote heap info block. This is needed to support
Expand Down Expand Up @@ -320,6 +323,7 @@ void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks,
for (i = 0, blk = block; i < max_blocks; i++, blk++)
list_add(&blk->list, &info->empty_list);
}
EXPORT_SYMBOL_GPL(rh_init);

/* Attach a free memory region, coalesces regions if adjuscent */
int rh_attach_region(rh_info_t * info, unsigned long start, int size)
Expand Down Expand Up @@ -360,6 +364,7 @@ int rh_attach_region(rh_info_t * info, unsigned long start, int size)

return 0;
}
EXPORT_SYMBOL_GPL(rh_attach_region);

/* Detatch given address range, splits free block if needed. */
unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size)
Expand Down Expand Up @@ -428,6 +433,7 @@ unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size)

return s;
}
EXPORT_SYMBOL_GPL(rh_detach_region);

/* Allocate a block of memory at the specified alignment. The value returned
* is an offset into the buffer initialized by rh_init(), or a negative number
Expand Down Expand Up @@ -502,6 +508,7 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch

return start;
}
EXPORT_SYMBOL_GPL(rh_alloc_align);

/* Allocate a block of memory at the default alignment. The value returned is
* an offset into the buffer initialized by rh_init(), or a negative number if
Expand All @@ -511,6 +518,7 @@ unsigned long rh_alloc(rh_info_t * info, int size, const char *owner)
{
return rh_alloc_align(info, size, info->alignment, owner);
}
EXPORT_SYMBOL_GPL(rh_alloc);

/* Allocate a block of memory at the given offset, rounded up to the default
* alignment. The value returned is an offset into the buffer initialized by
Expand Down Expand Up @@ -594,6 +602,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co

return start;
}
EXPORT_SYMBOL_GPL(rh_alloc_fixed);

/* Deallocate the memory previously allocated by one of the rh_alloc functions.
* The return value is the size of the deallocated block, or a negative number
Expand Down Expand Up @@ -626,6 +635,7 @@ int rh_free(rh_info_t * info, unsigned long start)

return size;
}
EXPORT_SYMBOL_GPL(rh_free);

int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats)
{
Expand Down Expand Up @@ -663,6 +673,7 @@ int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats)

return nr;
}
EXPORT_SYMBOL_GPL(rh_get_stats);

int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner)
{
Expand All @@ -687,6 +698,7 @@ int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner)

return size;
}
EXPORT_SYMBOL_GPL(rh_set_owner);

void rh_dump(rh_info_t * info)
{
Expand Down Expand Up @@ -722,10 +734,13 @@ void rh_dump(rh_info_t * info)
st[i].size, st[i].owner != NULL ? st[i].owner : "");
printk(KERN_INFO "\n");
}
EXPORT_SYMBOL_GPL(rh_dump);

void rh_dump_blk(rh_info_t * info, rh_block_t * blk)
{
printk(KERN_INFO
"blk @0x%p: 0x%lx-0x%lx (%u)\n",
blk, blk->start, blk->start + blk->size, blk->size);
}
EXPORT_SYMBOL_GPL(rh_dump_blk);

4 changes: 4 additions & 0 deletions arch/powerpc/platforms/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ config TAU_AVERAGE

config QUICC_ENGINE
bool
select PPC_LIB_RHEAP
help
The QUICC Engine (QE) is a new generation of communications
coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
Expand All @@ -274,6 +275,7 @@ config CPM2
bool
default n
select CPM
select PPC_LIB_RHEAP
help
The CPM2 (Communications Processor Module) is a coprocessor on
embedded CPUs made by Freescale. Selecting this option means that
Expand Down Expand Up @@ -313,4 +315,6 @@ config FSL_ULI1575
config CPM
bool

source "arch/powerpc/sysdev/bestcomm/Kconfig"

endmenu
1 change: 1 addition & 0 deletions arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ config PPC_8xx
select FSL_SOC
select 8xx
select WANT_DEVICE_TREE
select PPC_LIB_RHEAP

config 40x
bool "AMCC 40x"
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/sysdev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_FSL_SOC) += fsl_soc.o
obj-$(CONFIG_FSL_PCI) += fsl_pci.o
obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \
mv64x60_udbg.o
Expand Down
39 changes: 39 additions & 0 deletions arch/powerpc/sysdev/bestcomm/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Kconfig options for Bestcomm
#

config PPC_BESTCOMM
tristate "Bestcomm DMA engine support"
depends on PPC_MPC52xx
default n
select PPC_LIB_RHEAP
help
BestComm is the name of the communication coprocessor found
on the Freescale MPC5200 family of processor. It's usage is
optionnal for some drivers (like ATA), but required for
others (like FEC).

If you want to use drivers that require DMA operations,
answer Y or M. Otherwise say N.

config PPC_BESTCOMM_ATA
tristate "Bestcomm ATA task support"
depends on PPC_BESTCOMM
default n
help
This option enables the support for the ATA task.

config PPC_BESTCOMM_FEC
tristate "Bestcomm FEC tasks support"
depends on PPC_BESTCOMM
default n
help
This option enables the support for the FEC tasks.

config PPC_BESTCOMM_GEN_BD
tristate "Bestcomm GenBD tasks support"
depends on PPC_BESTCOMM
default n
help
This option enables the support for the GenBD tasks.

14 changes: 14 additions & 0 deletions arch/powerpc/sysdev/bestcomm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Makefile for BestComm & co
#

bestcomm-core-objs := bestcomm.o sram.o
bestcomm-ata-objs := ata.o bcom_ata_task.o
bestcomm-fec-objs := fec.o bcom_fec_rx_task.o bcom_fec_tx_task.o
bestcomm-gen-bd-objs := gen_bd.o bcom_gen_bd_rx_task.o bcom_gen_bd_tx_task.o

obj-$(CONFIG_PPC_BESTCOMM) += bestcomm-core.o
obj-$(CONFIG_PPC_BESTCOMM_ATA) += bestcomm-ata.o
obj-$(CONFIG_PPC_BESTCOMM_FEC) += bestcomm-fec.o
obj-$(CONFIG_PPC_BESTCOMM_GEN_BD) += bestcomm-gen-bd.o

Loading

0 comments on commit 4acadb9

Please sign in to comment.