staging: tidspbridge: 2.6.37-rcX fixes
Subsystems (3)
cover staging: tidspbridge: 2.6.37-rcX fixes
Hi Greg,
Please consider the following patch set for tidspbridge driver in staging tree, the following has been tested on an omap3430 based board
+ gst-dsp environment. Many thanks to Felipe Contreras for piling this up, as I'm just propagating his patches.
First two patches:
1. omap: dsp: remove shm from normal memory
2. staging: tidspbridge: hardcode SCM macros while fix is upstreamed
Resolve a couple of build breaks due to adaptations for memblock and SCM layer.
(2) Is meant as a temporary fix, until the patches to fix this (currently in review) are upstreamed. [1]
The rest of the series, is the revert of iommu migration changes. These are needed because, without modifications made to iommu module, they do not work; these modifications (on iommu code) didn't make it for the previous merge window either.
I will avoid posting the reverts (unless required), they can be found (along with the two patches of this series) at:
git://dev.omapzoom.org/pub/scm/tidspbridge/kernel-dspbridge.git
tidspbridge-2.6.37-rc1
Felipe Contreras (14):
omap: dsp: remove shm from normal memory
staging: tidspbridge: hardcode SCM macros while fix is upstreamed
Revert "staging: tidspbridge - update Kconfig to select IOMMU module" Revert "staging: tidspbridge - remove dmm custom module" Revert "staging: tidspbridge - deprecate reserve/unreserve_memory
funtions"
Revert "staging: tidspbridge - remove reserved memory clean up" Revert "staging: tidspbridge: remove dw_dmmu_base from cfg_hostres
struct"
Revert "staging: tidspbridge - move all iommu related code to a new
file"
Revert "staging: tidspbridge - remove hw directory"
Revert "staging: tidspbridge - fix mmufault support" Revert "staging: tidspbridge - remove custom mmu code from
tiomap3430.c"
Revert "staging: tidspbridge - rename bridge_brd_mem_map/unmap to a
proper name"
Revert "staging: tidspbridge - move shared memory iommu maps to
tiomap3430.c" Revert "staging: tidspbridge: replace iommu custom for opensource
implementation"
arch/arm/plat-omap/devices.c | 4 +- drivers/staging/tidspbridge/Kconfig | 1 - drivers/staging/tidspbridge/Makefile | 7 +- drivers/staging/tidspbridge/core/_deh.h | 5 +- drivers/staging/tidspbridge/core/_tiomap.h | 19 +- drivers/staging/tidspbridge/core/dsp-mmu.c | 317 ------ drivers/staging/tidspbridge/core/io_sm.c | 180 +++- drivers/staging/tidspbridge/core/tiomap3430.c | 1083 ++++++++++++++++++-- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 4 + drivers/staging/tidspbridge/core/tiomap_io.c | 17 +- drivers/staging/tidspbridge/core/ue_deh.c | 115 ++- drivers/staging/tidspbridge/hw/EasiGlobal.h | 41 + drivers/staging/tidspbridge/hw/MMUAccInt.h | 76 ++ drivers/staging/tidspbridge/hw/MMURegAcM.h | 225 ++++ drivers/staging/tidspbridge/hw/hw_defs.h | 58 ++ drivers/staging/tidspbridge/hw/hw_mmu.c | 562 ++++++++++ drivers/staging/tidspbridge/hw/hw_mmu.h | 163 +++ .../tidspbridge/include/dspbridge/cfgdefs.h | 1 + .../staging/tidspbridge/include/dspbridge/dev.h | 24 + .../staging/tidspbridge/include/dspbridge/dmm.h | 75 ++ .../staging/tidspbridge/include/dspbridge/drv.h | 10 + .../tidspbridge/include/dspbridge/dsp-mmu.h | 67 -- .../tidspbridge/include/dspbridge/dspdefs.h | 44 + .../tidspbridge/include/dspbridge/dspioctl.h | 7 + .../staging/tidspbridge/include/dspbridge/proc.h | 46 + drivers/staging/tidspbridge/pmgr/dev.c | 63 ++- drivers/staging/tidspbridge/pmgr/dmm.c | 533 ++++++++++ drivers/staging/tidspbridge/pmgr/dspapi.c | 34 +- drivers/staging/tidspbridge/rmgr/drv.c | 15 + drivers/staging/tidspbridge/rmgr/drv_interface.c | 2 + drivers/staging/tidspbridge/rmgr/node.c | 48 +- drivers/staging/tidspbridge/rmgr/proc.c | 197 ++++- 32 files changed, 3471 insertions(+), 572 deletions(-) delete mode 100644 drivers/staging/tidspbridge/core/dsp-mmu.c create mode 100644 drivers/staging/tidspbridge/hw/EasiGlobal.h create mode 100644 drivers/staging/tidspbridge/hw/MMUAccInt.h create mode 100644 drivers/staging/tidspbridge/hw/MMURegAcM.h create mode 100644 drivers/staging/tidspbridge/hw/hw_defs.h create mode 100644 drivers/staging/tidspbridge/hw/hw_mmu.c create mode 100644 drivers/staging/tidspbridge/hw/hw_mmu.h create mode 100644 drivers/staging/tidspbridge/include/dspbridge/dmm.h delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dsp-mmu.h create mode 100644 drivers/staging/tidspbridge/pmgr/dmm.c
PATCH 1/2 omap: dsp: remove shm from normal memory
From: Felipe Contreras <[email protected]>
Also, don't be picky about the location, which incidentally fixes the build since MEMBLOCK_REAL_LIMIT is gone on 2.6.37.
arch/arm/plat-omap/devices.c: In function 'omap_dsp_reserve_sdram_memblock':arch/arm/plat-omap/devices.c:287: error: 'MEMBLOCK_REAL_LIMIT'
undeclared (first use in this function)
--- arch/arm/plat-omap/devices.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-omap/devices.c +3 -1
@@ -284,12 +284,14 @@ void __init omap_dsp_reserve_sdram_memblock(void)if (!size)return ; - paddr =__memblock_alloc_base (size,SZ_1M ,MEMBLOCK_REAL_LIMIT ); + paddr =memblock_alloc (size,SZ_1M );if (!paddr) {pr_err ("%s: failed to reserve %x bytes\n" , __func__, size);return ; } +memblock_free (paddr, size); +memblock_remove (paddr, size); omap_dsp_phys_mempool_base = paddr; }
Signature · 1 line
1.7.1
Re: [PATCH 01/02] omap: dsp: remove shm from normal memory
Quoted 4 lines · Omar Ramirez Luna
From: Felipe Contreras <[email protected]>
Also, don't be picky about the location, which incidentally fixes the build since
MEMBLOCK_REAL_LIMITis gone on 2.6.37.
That comment is wrong. memblock_alloc() is still as picky as the original.
phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align)
{
return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE);
} /* Pump up max_addr */
if (end == MEMBLOCK_ALLOC_ACCESSIBLE)
end = memblock.current_limit;and current_limit is initialized to what was MEMBLOCK_REAL_LIMIT. So, memblock_alloc() will always allocate from lowmem.
PATCH 2/2 staging: tidspbridge: hardcode SCM macros while fix is upstreamed
In reply to Omar Ramirez LunaFrom: Felipe Contreras <[email protected]>
On 2.6.37-rc1, omap platform internals for SCM have changed, so the build is broken again.
drivers/staging/tidspbridge/core/tiomap3430.c:26:
fatal error: plat/control.h: No such file or directory
This is a totally ugly layer violation, but needed until omap_ctrl_set_dsp_boot*() are provided.
--- drivers/staging/tidspbridge/core/tiomap3430.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
drivers/staging/tidspbridge/core/tiomap3430.c +13 -1
@@ -23,7 +23,6 @@#include <dspbridge/host_os.h> #include <linux/mm.h> #include <linux/mmzone.h> -#include <plat/control.h> /* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/dbdefs.h>
@@ -68,6 +67,19 @@#define OMAP3_IVA2_BOOTADDR_MASK 0xFFFFFC00#define PAGES_II_LVL_TABLE 512 +/* +* This is a totally ugly layer violation, but needed until +* omap_ctrl_set_dsp_boot*() are provided. +*/ +#define OMAP3_IVA2_BOOTMOD_IDLE 1 +#define OMAP2_CONTROL_GENERAL 0x270 +#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) +#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) + +#define OMAP343X_CTRL_REGADDR (reg) \ + OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) + +/* Forward Declarations: */ static int bridge_brd_monitor (struct bridge_dev_context *dev_ctxt); static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
Signature · 1 line
1.7.1
Quoted 22 lines · Omar Ramirez Luna
Hi Greg,
Please consider the following patch set for tidspbridge driver in staging tree, the following has been tested on an omap3430 based board
+ gst-dsp environment. Many thanks to Felipe Contreras for piling this up, as I'm just propagating his patches.First two patches:
1. omap: dsp: remove shm from normal memory
2. staging: tidspbridge: hardcode SCM macros while fix is upstreamedResolve a couple of build breaks due to adaptations for memblock and SCM layer.
(2) Is meant as a temporary fix, until the patches to fix this (currently in review) are upstreamed. [1]
The rest of the series, is the revert of iommu migration changes. These are needed because, without modifications made to iommu module, they do not work; these modifications (on iommu code) didn't make it for the previous merge window either.
Quoted 5 lines
I will avoid posting the reverts (unless required), they can be found (along with the two patches of this series) at:
git://dev.omapzoom.org/pub/scm/tidspbridge/kernel-dspbridge.gittidspbridge-2.6.37-rc1
I've pulled from this tree and pushed it out to the staging-linus branch to get sent to Linus before .37 is released.
thanks,
greg k-h