dma-swiotlb.c (c67dda14389205f0a223c5089307495290939b3b) dma-swiotlb.c (95f72d1ed41a66f1c1c29c24d479de81a0bea36f)
1/*
2 * Contains routines needed to support swiotlb for ppc.
3 *
4 * Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
5 * Author: Becky Bruce
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 57 unchanged lines hidden (view full) ---

66 /* We are only intereted in device addition */
67 if (action != BUS_NOTIFY_ADD_DEVICE)
68 return 0;
69
70 sd = &dev->archdata;
71 sd->max_direct_dma_addr = 0;
72
73 /* May need to bounce if the device can't address all of DRAM */
1/*
2 * Contains routines needed to support swiotlb for ppc.
3 *
4 * Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
5 * Author: Becky Bruce
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 57 unchanged lines hidden (view full) ---

66 /* We are only intereted in device addition */
67 if (action != BUS_NOTIFY_ADD_DEVICE)
68 return 0;
69
70 sd = &dev->archdata;
71 sd->max_direct_dma_addr = 0;
72
73 /* May need to bounce if the device can't address all of DRAM */
74 if ((dma_get_mask(dev) + 1) < lmb_end_of_DRAM())
74 if ((dma_get_mask(dev) + 1) < memblock_end_of_DRAM())
75 set_dma_ops(dev, &swiotlb_dma_ops);
76
77 return NOTIFY_DONE;
78}
79
80static struct notifier_block ppc_swiotlb_plat_bus_notifier = {
81 .notifier_call = ppc_swiotlb_bus_notify,
82 .priority = 0,

--- 16 unchanged lines hidden ---
75 set_dma_ops(dev, &swiotlb_dma_ops);
76
77 return NOTIFY_DONE;
78}
79
80static struct notifier_block ppc_swiotlb_plat_bus_notifier = {
81 .notifier_call = ppc_swiotlb_bus_notify,
82 .priority = 0,

--- 16 unchanged lines hidden ---