Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149302237
D43553.1789840687.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43553.1789840687.diff
View Options
diff --git a/sys/powerpc/include/resource.h b/sys/powerpc/include/resource.h
--- a/sys/powerpc/include/resource.h
+++ b/sys/powerpc/include/resource.h
@@ -41,4 +41,11 @@
#define SYS_RES_IOPORT 4 /* i/o ports */
#define PCI_RES_BUS 5 /* PCI bus numbers */
+/*
+ * A powerpc-specific resource flag to request little-endian bus tags
+ * for a resource.
+ */
+
+#define RF_LITTLEENDIAN RF_SPARE1
+
#endif /* !_MACHINE_RESOURCE_H_ */
diff --git a/sys/powerpc/mpc85xx/fsl_sata.c b/sys/powerpc/mpc85xx/fsl_sata.c
--- a/sys/powerpc/mpc85xx/fsl_sata.c
+++ b/sys/powerpc/mpc85xx/fsl_sata.c
@@ -352,9 +352,8 @@
}
ch->r_mid = 0;
if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &ch->r_mid, RF_ACTIVE)))
+ &ch->r_mid, RF_ACTIVE | RF_LITTLEENDIAN)))
return (ENXIO);
- rman_set_bustag(ch->r_mem, &bs_le_tag);
fsl_sata_dmainit(dev);
fsl_sata_slotsalloc(dev);
fsl_sata_init(dev);
diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c
--- a/sys/powerpc/powerpc/nexus.c
+++ b/sys/powerpc/powerpc/nexus.c
@@ -275,14 +275,20 @@
panic("%s:%d SYS_RES_IOPORT handling not implemented", __func__, __LINE__);
/* XXX: untested
map->r_bushandle = start;
- map->r_bustag = nexus_get_bus_tag(NULL, NULL);
+ if ((rman_get_flags(r) & RF_LITTLEENDIAN) != 0)
+ map->r_bustag = &bs_le_tag;
+ else
+ map->r_bustag = nexus_get_bus_tag(NULL, NULL);
map->r_size = length;
map->r_vaddr = NULL;
*/
break;
case SYS_RES_MEMORY:
map->r_vaddr = pmap_mapdev_attr(start, length, args.memattr);
- map->r_bustag = nexus_get_bus_tag(NULL, NULL);
+ if ((rman_get_flags(r) & RF_LITTLEENDIAN) != 0)
+ map->r_bustag = &bs_le_tag;
+ else
+ map->r_bustag = nexus_get_bus_tag(NULL, NULL);
map->r_size = length;
map->r_bushandle = (bus_space_handle_t)map->r_vaddr;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 19, 5:58 PM (6 h, 56 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29777311
Default Alt Text
D43553.1789840687.diff (1 KB)
Attached To
Mode
D43553: powerpc: Add RF_LITTLEENDIAN resource flag
Attached
Detach File
Event Timeline
Log In to Comment