/* * Copyright (C) 2010 Tobias Klauser * Copyright (C) 2010 chysun2000@gmail.com * * This file is part of nios2sim-ng. * * 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. */ #ifndef _DEVICE_H_ #define _DEVICE_H_ /* IRQs for all used devices shall be allocated here */ #define IRQ_TIMER 1 #define IRQ_UART 2 #define IRQ_JTAG_UART 3 #define IRQ_TO_MASK(irq) (1UL << (irq)) struct device { const char *name; uint32_t base; size_t size; uint32_t irq_mask; int (*init)(struct device *dev); bool (*is_dev_addr)(struct device *dev, uint32_t addr); size_t (*read)(struct device *dev, uint32_t addr, uint32_t *data, size_t count); size_t (*write)(struct device *dev, uint32_t addr, uint32_t *data, size_t count); bool (*has_irq)(struct device *dev); void (*simulate)(struct device *dev); /* Private data */ void *priv; }; extern bool device_generic_is_dev_addr(struct device *dev, uint32_t addr); extern int device_init_all(void); extern struct device *device_get_by_addr(uint32_t addr); extern void device_simulate_all(void); /* * Device registers */ struct io_register { uint32_t addr; uint32_t valid_mask; uint32_t readonly_mask; uint32_t value; }; #define REG_TO_OFF(reg) ((reg) * sizeof(uint32_t)) extern void io_register_init(struct io_register *reg, uint32_t addr, uint32_t valid, uint32_t readonly, uint32_t value); extern uint32_t io_register_read(struct io_register *reg); extern void io_register_write(struct io_register *reg, uint32_t value); #endif /* _DEVICE_H_ */ a>refslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-04-21 13:52:38 +0200
committerLucas Stach <l.stach@pengutronix.de>2016-04-21 15:08:54 +0200
commit2144fff7df8e76654fa72b0a9d2324ce2e0c8a5c (patch)
tree75db331b1843f6b894188eb47bdb235e93a50fdd /Documentation
parentc3b46c73264b03000d1e18b22f5caf63332547c9 (diff)
drm/etnaviv: don't move linear memory window on 3D cores without MC2.0
On cores with MC1.0 the memory window offset is not properly respected by all engines in the core, leading to different views of the memory if the offset in non-zero. This causes relocs for those engines to be wrong and might lead to other subtile problems. Rather than trying to work around this, just disable the linear memory window offset for those cores. Suggested-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'Documentation')