Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbbDFP7a (ORCPT ); Mon, 6 Apr 2015 11:59:30 -0400 Received: from forward4l.mail.yandex.net ([84.201.143.137]:40459 "EHLO forward4l.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbbDFP73 (ORCPT ); Mon, 6 Apr 2015 11:59:29 -0400 From: Andrew Andrianov To: Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=EF=BF=BDnnev=EF=BF=BDg?= , Riley Andrews , Chen Gang , Fabian Frederick Cc: Andrew Andrianov , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: ion: Add ion-physmem documentation Date: Mon, 6 Apr 2015 18:59:22 +0300 Message-Id: <1428335962-10110-1-git-send-email-andrew@ncrmnt.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1428335363-9854-1-git-send-email-andrew@ncrmnt.org> References: <1428335363-9854-1-git-send-email-andrew@ncrmnt.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3069 Lines: 100 Signed-off-by: Andrew Andrianov --- Documentation/devicetree/bindings/ion,physmem.txt | 80 +++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/ion,physmem.txt diff --git a/Documentation/devicetree/bindings/ion,physmem.txt b/Documentation/devicetree/bindings/ion,physmem.txt new file mode 100644 index 0000000..df18b5f --- /dev/null +++ b/Documentation/devicetree/bindings/ion,physmem.txt @@ -0,0 +1,80 @@ +ION PhysMem Driver +#include + + +ION PhysMem is a generic driver for ION Memory Manager that allows you to +define ION Memory Manager heaps using device tree. This is mostly useful if +your SoC has several 'special' regions (e.g. SRAM, dedicated memory banks, +etc) that are present in the physical memory map and you want to add them to +ION as heaps of memory. + + +Examples: + +1. 256KiB On-chip SRAM used as ION DMA heap. reg range is treated as a physical + address range + + ion_im0: ion@0x00100000 { + compatible = "ion,physmem"; + reg = <0x00100000 0x40000>; + reg-names = "memory"; + ion-heap-id = <2>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "IM0"; + }; + +2. The same, but using system DMA memory. + + ion_dma: ion@0xdeadbeef { + compatible = "ion,physmem"; + ion-heap-id = <2>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "SYSDMA"; + }; + +2. Carveout heap, 1MiB size, ion-physmem will alloc pages for it using + alloc_pages_exact(). reg range is used for specifying size only. + + ion_crv: ion@deadbeef { + compatible = "ion,physmem"; + reg = <0x00000000 0x100000>; + reg-names = "memory"; + ion-heap-id = <3>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "carveout"; + }; + +3. Chunk heap. 1MiB size, ion-physmem will alloc pages for it using + alloc_pages_exact(). reg range is used for specifying size only. + + ion_chunk: ion@0xdeadbeef { + compatible = "ion,physmem"; + ion-heap-id = <2>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "chunky"; + }; + + +4. vmalloc(); + + ion_chunk: ion@0xdeadbeef { + compatible = "ion,physmem"; + ion-heap-id = <2>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "sys"; + }; + +5. kmalloc(); + + ion_chunk: ion@0xdeadbeef { + compatible = "ion,physmem"; + ion-heap-id = <2>; + ion-heap-type = ; + ion-heap-align = <0x10>; + ion-heap-name = "syscont"; + }; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/