]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: MMU fwk modulisation and misc. changes.
authorTrilok Soni <soni.trilok@gmail.com>
Sun, 25 Feb 2007 13:52:50 +0000 (19:22 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 6 Mar 2007 11:05:43 +0000 (03:05 -0800)
- MMU fwk modulisations
- Patch from Doyu-San for OMAP1

Signed-off-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
13 files changed:
arch/arm/mach-omap1/Makefile
arch/arm/mach-omap1/mmu.c
arch/arm/mach-omap1/mmu.h
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/mmu.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/Makefile
arch/arm/plat-omap/dsp/Kconfig
arch/arm/plat-omap/dsp/dsp_common.c
arch/arm/plat-omap/dsp/mmu.h
arch/arm/plat-omap/dsp/omap1_dsp.h
arch/arm/plat-omap/dsp/taskwatch.c
arch/arm/plat-omap/mmu.c

index 6819d0c42b5f56d37e66d6a84ce257d8e09df009..83776653906c0d6f6821e027b1df11292ae882f2 100644 (file)
@@ -11,8 +11,10 @@ obj-$(CONFIG_OMAP_MPU_TIMER)         += time.o
 obj-$(CONFIG_PM) += pm.o sleep.o
 
 # DSP
-obj-$(CONFIG_OMAP_DSP) += mailbox_mach.o mmu.o
-mailbox_mach-objs      := mailbox.o
+obj-$(CONFIG_OMAP_MMU_FWK)     += mmu_mach.o
+obj-$(CONFIG_OMAP_MBOX_FWK)    += mailbox_mach.o
+mailbox_mach-objs              := mailbox.o
+mmu_mach-objs                  := mmu.o
 
 led-y := leds.o
 
index 108e75c47fdd3764ddb4231dd4e0e6a67f17ca69..7417124a45a08b8db91dd3cea3b6c6ee1eec7c0c 100644 (file)
@@ -72,6 +72,7 @@ void dsp_mem_usecount_clear(void)
                omap_dsp_release_mem();
        }
 }
+EXPORT_SYMBOL_GPL(dsp_mem_usecount_clear);
 
 static int omap1_mmu_mem_enable(struct omap_mmu *mmu, void *addr)
 {
@@ -271,4 +272,4 @@ struct omap_mmu_ops omap1_mmu_ops = {
        .cam_ram_alloc  = omap1_mmu_cam_ram_alloc,
        .cam_ram_valid  = omap1_mmu_cam_ram_valid,
 };
-
+EXPORT_SYMBOL_GPL(omap1_mmu_ops);
index 31ce3b835d99cdcb59e6a1d2d46839815a928fce..3acbb846a989e2c03a88de7a28d1ca7f9975dc57 100644 (file)
@@ -107,13 +107,13 @@ struct omap_mmu_tlb_entry {
 static inline unsigned short
 omap_mmu_read_reg(struct omap_mmu *mmu, unsigned long reg)
 {
-       return omap_readw(mmu->base + reg);
+       return __raw_readw(mmu->base + reg);
 }
 
 static void omap_mmu_write_reg(struct omap_mmu *mmu,
                               unsigned short val, unsigned long reg)
 {
-       omap_writew(val, mmu->base + reg);
+       __raw_writew(val, mmu->base + reg);
 }
 
 int omap_dsp_request_mem(void);
index 9f5811bff05a35f9bf7834c84bdb4ec871638cdf..6842b2824ba34a1e5f3091bc0fc8b0473eceeb6d 100644 (file)
@@ -12,8 +12,10 @@ obj-$(CONFIG_OMAP_MPU_TIMER)         += timer-gp.o
 obj-$(CONFIG_PM) += pm.o sleep.o
 
 # DSP
-obj-$(CONFIG_OMAP_DSP) += mailbox_mach.o mmu.o
-mailbox_mach-objs      := mailbox.o
+obj-$(CONFIG_OMAP_MMU_FWK)     += mmu_mach.o
+obj-$(CONFIG_OMAP_MBOX_FWK)    += mailbox_mach.o
+mailbox_mach-objs              := mailbox.o
+mmu_mach-objs                  := mmu.o
 
 # Specific board support
 obj-$(CONFIG_MACH_OMAP_GENERIC)                += board-generic.o
index 5f74e845f31ad08ee4a04f33952882a9617470a6..be8764d17284c7f0afceb329ad2a93e00157ab30 100644 (file)
@@ -286,3 +286,6 @@ struct omap_mmu_ops omap2_mmu_ops = {
        .cam_ram_alloc  = omap2_mmu_cam_ram_alloc,
        .cam_ram_valid  = omap2_mmu_cam_ram_valid,
 };
+EXPORT_SYMBOL_GPL(omap2_mmu_ops);
+
+MODULE_LICENSE("GPL");
index 3114d8271b55a305a1464d81a267e79c90923c0c..6facd962b48f083e9c2cf2c52e9900b85320c439 100644 (file)
@@ -119,6 +119,22 @@ config OMAP_MCBSP
          Say Y here if you want support for the OMAP Multichannel
          Buffered Serial Port.
 
+config OMAP_MMU_FWK
+       tristate "MMU framework support"
+       depends on ARCH_OMAP
+       default n
+       help
+         Say Y here if you want to use OMAP MMU framework support for
+         DSP, IVA1.0 and Camera in OMAP1/2.
+
+config OMAP_MBOX_FWK
+       tristate "Mailbox framework support"
+       depends on ARCH_OMAP
+       default n
+       help
+         Say Y here if you want to use OMAP Mailbox framework support for
+         DSP and IVA1.0 in OMAP1/2.
+
 choice
         prompt "System timer"
        default OMAP_MPU_TIMER
index 05eb3cb1dc9017cdb1426e044bd7d40c832af2ca..d17ca1a211a9f5d9098b0a999ae75332bf8c86d2 100644 (file)
@@ -27,6 +27,11 @@ obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o
 obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
 obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
 
+# OMAP MMU framework
+obj-$(CONFIG_OMAP_MMU_FWK) += mmu.o
+
+# OMAP mailbox framework
+obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
+
 # DSP subsystem
 obj-y += dsp/
-obj-$(CONFIG_OMAP_DSP) += mailbox.o mmu.o
index 71da40bc538ef968894ffe816c033da3a1754a1c..592740fcc12a69122c4d909273345ae6913c58eb 100644 (file)
@@ -2,6 +2,8 @@
 config OMAP_DSP
        tristate "OMAP DSP driver (DSP Gateway)"
        depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP24XX
+       select OMAP_MMU_FWK
+       select OMAP_MBOX_FWK
        help
          This enables OMAP DSP driver, DSP Gateway.
 
index 2f3117e31b2151363ccaeb99c13ea68a31818f4e..2751324d0f883a4ecb8a9bcab82eb4f154b8e1ea 100644 (file)
@@ -607,10 +607,8 @@ EXPORT_SYMBOL(dsp_cpustat_request);
 EXPORT_SYMBOL(dsp_cpustat_get_stat);
 EXPORT_SYMBOL(dsp_cpustat_get_icrmask);
 EXPORT_SYMBOL(dsp_cpustat_set_icrmask);
-#ifdef CONFIG_ARCH_OMAP1
 EXPORT_SYMBOL(dsp_register_mem_cb);
 EXPORT_SYMBOL(dsp_unregister_mem_cb);
-#endif /* CONFIG_ARCH_OMAP1 */
 
 EXPORT_SYMBOL(__cpu_flush_kern_tlb_range);
 EXPORT_SYMBOL(cpu_architecture);
index ab9953ab9ecc7234bc370ef39081b23c0894d8f1..822071c086aa8b90d91509c6890f7219a72dcf2a 100644 (file)
@@ -7,7 +7,7 @@
 struct omap_mmu dsp_mmu = {
        .name           = "dsp",
        .type           = OMAP_MMU_DSP,
-       .base           = OMAP15XX_DSP_START,
+       .base           = DSP_MMU_BASE,
        .membase        = OMAP15XX_DSP_BASE,
        .memsize        = OMAP15XX_DSP_SIZE,
        .nr_tlb_entries = 32,
@@ -19,7 +19,7 @@ struct omap_mmu dsp_mmu = {
 struct omap_mmu dsp_mmu = {
        .name           = "dsp",
        .type           = OMAP_MMU_DSP,
-       .base           = OMAP16XX_DSP_START,
+       .base           = DSP_MMU_BASE,
        .membase        = OMAP16XX_DSP_BASE,
        .memsize        = OMAP16XX_DSP_SIZE,
        .nr_tlb_entries = 32,
index 8dfe4d6ec39d9316d2a5c13b1f8331b9584e15d7..45fdb507d99b077fcd13f62e716d8fbfa2e72ae9 100644 (file)
 /*
  * DSP MMU
  */
-#define DSP_MMU_BASE                   (0xfffed200)
+#define DSP_MMU_BASE                   (0xfefed200)
 #define DSP_MMU_PREFETCH               (DSP_MMU_BASE + 0x00)
 #define DSP_MMU_WALKING_ST             (DSP_MMU_BASE + 0x04)
 #define DSP_MMU_CNTL                   (DSP_MMU_BASE + 0x08)
index cfec6b3e5e54c4aa8da24ff8e8da02024c877bcc..0a5781d4e4a3f788f0e875b9c99607a83f5c4bb9 100644 (file)
@@ -26,9 +26,9 @@
 #include <linux/poll.h>
 #include <linux/sched.h>
 #include <asm/uaccess.h>
+#include <asm/arch/dsp.h>
 #include "dsp_mbcmd.h"
 #include "dsp.h"
-#include "ioctl.h"
 
 static DECLARE_WAIT_QUEUE_HEAD(read_wait_q);
 static unsigned int change_cnt;
index d5af168b882c08bfe9188f51ff6638a218f3798f..a7c06421c030007f77c6c24122ebdec6b378bb82 100644 (file)
@@ -281,6 +281,7 @@ start:
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(exmap_valid);
 
 /*
  * omap_mmu_exmap_use(), unuse():
@@ -361,6 +362,7 @@ omap_mmu_virt_to_phys(struct omap_mmu *mmu, void *vadr, size_t *len)
        /* valid mapping not found */
        return 0;
 }
+EXPORT_SYMBOL_GPL(omap_mmu_virt_to_phys);
 
 /*
  * MMU operations
@@ -708,6 +710,7 @@ fail:
        omap_mmu_exunmap(mmu, dspadr);
        return status;
 }
+EXPORT_SYMBOL_GPL(omap_mmu_exmap);
 
 static unsigned long unmap_free_arm(struct exmap_tbl *ent)
 {
@@ -831,6 +834,7 @@ void exmap_setup_preserved_mem_page(struct omap_mmu *mmu, void *buf,
        INIT_TLB_ENTRY_4KB_PRESERVED(&tlb_ent, dspadr, phys);
        omap_mmu_load_tlb_entry(mmu, &tlb_ent);
 }
+EXPORT_SYMBOL_GPL(exmap_setup_preserved_mem_page);
 
 void exmap_clear_mem_page(struct omap_mmu *mmu, unsigned long dspadr)
 {
@@ -839,6 +843,7 @@ void exmap_clear_mem_page(struct omap_mmu *mmu, unsigned long dspadr)
        exmap_clear_armmmu((unsigned long)virt, PAGE_SIZE);
        /* DSP MMU is shutting down. not handled here. */
 }
+EXPORT_SYMBOL_GPL(exmap_clear_mem_page);
 
 static void omap_mmu_reset(struct omap_mmu *mmu)
 {
@@ -1300,6 +1305,7 @@ err_dev_register:
        mmu->exmap_tbl = NULL;
        return ret;
 }
+EXPORT_SYMBOL_GPL(omap_mmu_register);
 
 void omap_mmu_unregister(struct omap_mmu *mmu)
 {
@@ -1318,6 +1324,7 @@ void omap_mmu_unregister(struct omap_mmu *mmu)
 
        device_unregister(&mmu->dev);
 }
+EXPORT_SYMBOL_GPL(omap_mmu_unregister);
 
 static int __init omap_mmu_class_init(void)
 {
@@ -1336,3 +1343,5 @@ static void __exit omap_mmu_class_exit(void)
 
 subsys_initcall(omap_mmu_class_init);
 module_exit(omap_mmu_class_exit);
+
+MODULE_LICENSE("GPL");