Skip to content

Commit

Permalink
ARM: tegra: use IO_ADDRESS for getting virtual address
Browse files Browse the repository at this point in the history
Use macro IO_ADDRESS for getting virtual address of
corresponding physical address to make the consistency
with rest of Tegra code-base.
This macro calls the IO_TO_VIRT() which is defined in
arch/arm/mach-tegra/include/mach/iomap.h

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
  • Loading branch information
Laxman Dewangan authored and Stephen Warren committed Sep 6, 2012
1 parent 4cbe5a5 commit f8e798a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-tegra/apbio.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ static apbio_write_fptr apbio_write;

static u32 tegra_apb_readl_direct(unsigned long offset)
{
return readl(IO_TO_VIRT(offset));
return readl(IO_ADDRESS(offset));
}

static void tegra_apb_writel_direct(u32 value, unsigned long offset)
{
writel(value, IO_TO_VIRT(offset));
writel(value, IO_ADDRESS(offset));
}

void tegra_apb_io_init(void)
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-tegra/fuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ void tegra_init_fuse(void)
{
u32 id;

u32 reg = readl(IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48));
u32 reg = readl(IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48));
reg |= 1 << 28;
writel(reg, IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48));
writel(reg, IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48));

reg = tegra_fuse_readl(FUSE_SKU_INFO);
tegra_sku_id = reg & 0xFF;
Expand Down

0 comments on commit f8e798a

Please sign in to comment.