/* * SDK7786 FPGA SRAM Support. * * Copyright (C) 2010 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include #include #include #include #include #include #include static int __init fpga_sram_init(void) { unsigned long phys; unsigned int area; void __iomem *vaddr; int ret; u16 data; /* Enable FPGA SRAM */ data = fpga_read_reg(LCLASR); data |= LCLASR_FRAMEN; fpga_write_reg(data, LCLASR); /* * FPGA_SEL determines the area mapping */ area = (data & LCLASR_FPGA_SEL_MASK) >> LCLASR_FPGA_SEL_SHIFT; if (unlikely(area == LCLASR_AREA_MASK)) { pr_err("FPGA memory unmapped.\n"); return -ENXIO; } /* * The memory itself occupies a 2KiB range at the top of the area * immediately below the system registers. */ phys = (area << 26) + SZ_64M - SZ_4K; /* * The FPGA SRAM resides in translatable physical space, so set * up a mapping prior to inserting it in to the pool. */ vaddr = ioremap(phys, SZ_2K); if (unlikely(!vaddr)) { pr_err("Failed remapping FPGA memory.\n"); return -ENXIO; } pr_info("Adding %dKiB of FPGA memory at 0x%08lx-0x%08lx " "(area %d) to pool.\n", SZ_2K >> 10, phys, phys + SZ_2K - 1, area); ret = gen_pool_add(sram_pool, (unsigned long)vaddr, SZ_2K, -1); if (unlikely(ret < 0)) { pr_err("Failed adding memory\n"); iounmap(vaddr); return ret; } return 0; } postcore_initcall(fpga_sram_init); linux/net-next.git/log/arch/openrisc/include/asm/processor.h'>logtreecommitdiff
tion value='6'>6
AgeCommit message (Expand)AuthorFilesLines
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-20 15:44:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-15 10:34:18 +0100
commit5db4992d8f040b8d8db0b86d42806e0c417f7ccf (patch)
tree5b06e952af482d45f3ade64e77824662e34b7fa2 /arch/mips/sgi-ip22/ip22-reset.c
parent370ebb0ef6255132373ed35d13e7b1d8d2eb7003 (diff)
usbnet: pegasus: Use net_device_stats from struct net_devicends-private-remove
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <petkan@nucleusys.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'arch/mips/sgi-ip22/ip22-reset.c')